� {fc @ 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( ( s: /usr/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( ( s: /usr/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 ( ( s: /usr/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 ( ( s: /usr/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 ( ( s: /usr/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 ( ( s: /usr/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 ( ( ( s: /usr/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$ ( ( s: /usr/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt __init__8 s c C s t | j | � S( N( t getattrR ( R t name( ( s: /usr/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt __getattr__; s c C s t | _ d S( N( t TrueR' ( R ( ( s: /usr/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt bell= s ( R R R( R+ R- ( ( ( s: /usr/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 ( ( s: /usr/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 ( ( s: /usr/lib64/python2.7/idlelib/idle_test/test_idlehistory.pyt setUpI s c C s | j j � | ` d S( N( R2 t destroy( R ( ( s: /usr/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&