ó 4Y~gc @ sâ d d l Z d d l m Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d Z d Z d e j f d „ ƒ YZ d d d „ ƒ YZ d e j f d „ ƒ YZ e d k rÞ e j d d d d ƒ n d S( iÿÿÿÿN( t requires( t Text( t History( t idleConfs a = 7s b = at StoreTestc B sJ e Z d Z e d „ ƒ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s7 Tests History.__init__ and History.store with mock Textc C s" t ƒ | _ t | j ƒ | _ d S( N( t mkTextt textR t history( t cls( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt setUpClass s c C s# | j j d d ƒ g | j _ d S( Ns 1.0t end( R t deleteR ( t self( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt tearDown s c C s„ | j | j j | j ƒ | j | j j g ƒ | j | j j ƒ | j | j j ƒ | j | j j t j d d d d d ƒ ƒ d S( Nt mainR t cyclici t bool( t assertIsR R t assertEqualt assertIsNonet prefixt pointerR R t GetOption( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt test_init s c C sP | j j d ƒ | j | j j g ƒ | j j d ƒ | j | j j g ƒ d S( Nt as a ( R t storeR ( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt test_store_short! s c C s… | j j t ƒ | j | j j t g ƒ | j j t ƒ | j | j j t t g ƒ | j j t ƒ | j | j j t t g ƒ d S( N( R R t line1R t line2( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt test_store_dup' s c C sR t | j _ d | j _ | j j t ƒ | j | j j ƒ | j | j j ƒ d S( Ni ( R R R R R R R ( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt test_store_reset/ s ( t __name__t __module__t __doc__t classmethodR R R R R R ( ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyR s t TextWrapperc B s# e Z d „ Z d „ Z d „ Z RS( c C s t d | ƒ | _ t | _ d S( Nt master( t tkTextR t Falset _bell( R R$ ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt __init__8 s c C s t | j | ƒ S( N( t getattrR ( R t name( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt __getattr__; s c C s t | _ d S( N( t TrueR' ( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt bell= s ( R R R( R+ R- ( ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyR# 7 s t FetchTestc B s’ e Z d Z e d „ ƒ Z d „ Z e d „ ƒ Z e d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s- Test History.fetch with wrapped tk.Text. c C s* t d ƒ t j ƒ | _ | j j ƒ d S( Nt gui( R t tkt Tkt roott withdraw( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyR C s c C sk t | j ƒ | _ } | j d d ƒ | j d d ƒ | j d d ƒ t | ƒ | _ t t g | j _ d S( Ns 1.0s >>> t iomarks 1.4t left( R# R2 R t insertt mark_sett mark_gravityR R R R ( R R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt setUpI s c C s | j j ƒ | ` d S( N( R2 t destroy( R ( ( sG /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt tearDownClassQ s c C s¦ | j } | j | ƒ | j } | | j j d d ƒ | ƒ | | j j | ƒ | rc t | j _ n | | j | ƒ | | j | ƒ | | j j d d d ƒ d ƒ d S( NR4 s end-1cR6 s ==i ( R t fetchR R t getR' R&