관리-도구
편집 파일: test_searchengine.cpython-33.pyc
� ��f�, c @ s� d Z d d l Z d d l Z d d l m Z d d l m Z m Z m Z d d l j Z d d l m Z d d l m Z m Z d d l m Z d d � Z d d � Z Gd d � d � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z e d k r�e j d d d d � n d S( u9 Test functions and SearchEngine class in SearchEngine.py.i N( u requires( u BooleanVaru StringVaru TclError( u SearchEngine( u Varu Mbox( u Textc C s t t _ t t _ t t _ d S( N( u Varu seu BooleanVaru StringVaru Mboxu tkMessageBox( ( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu setUpModule s u setUpModulec C s t t _ t t _ t t _ d S( N( u BooleanVaru seu StringVaru tkMessageBox( ( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu tearDownModule s u tearDownModulec B s | Ee Z d Z d d � Z d S( u Mockc O s d S( N( ( u selfu argsu kwargs( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu __init__ s u Mock.__init__N( u __name__u __module__u __qualname__u __init__( u __locals__( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu Mock s u Mockc B s | Ee Z d Z d d � Z d S( u GetTestc C s~ t j } t t _ z[ t � } t j | � } | j | t j � | j | j | � | j t j | � | � Wd | t _ Xd S( N( u seu SearchEngineu Mocku getu assertIsInstanceu assertIsu _searchengine( u selfu saved_Engineu rootu engine( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_get# s u GetTest.test_getN( u __name__u __module__u __qualname__u test_get( u __locals__( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu GetTest! s u GetTestc B s | Ee Z d Z d d � Z d S( u GetLineColTestc C sb | j t j d � d � | j t j d � d � | j t t j d � | j t t j d � d S( Nu 1.0i i u 1.11i u 1.0 lineendu end( i i ( i i ( u assertEqualu seu get_line_colu assertRaisesu ValueError( u self( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_get_line_col1 s u GetLineColTest.test_get_line_colN( u __name__u __module__u __qualname__u test_get_line_col( u __locals__( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu GetLineColTest/ s u GetLineColTestc B s | Ee Z d Z d d � Z d S( u GetSelectionTestc C sy t � } | j d d � d d � } | | _ | j t j | � d � d d � } | | _ | j t j | � d � d S( Nu 1.0u Hello World!c S s* | d k r d S| d k r d St � d S( Nu sel.firstu 1.0u sel.lastu 1.12( u TclError( u s( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu selK s u0 GetSelectionTest.test_get_selection.<locals>.selu 1.12c S s | d k r d St � d S( Nu insertu 1.5( u TclError( u s( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu markS s u1 GetSelectionTest.test_get_selection.<locals>.marku 1.5( u 1.0u 1.12( u 1.5u 1.5( u mockTextu insertu indexu assertEqualu seu get_selection( u selfu textu selu mark( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_get_selectionE s u# GetSelectionTest.test_get_selectionN( u __name__u __module__u __qualname__u test_get_selection( u __locals__( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu GetSelectionTest8 s u GetSelectionTestc B s | Ee Z d Z d d � Z d S( u ReverseSearchTestc C s� | j } d } t j d � } | t j | | t | � � j � d � | t j | | d � j � d � | t j | | d � j � d � | t j | | d � j � d � | t j | | d � d � d S( Nu Here is an 'is' test text.u isi i i i i i ( i i ( i i ( i i ( i i ( u assertEqualu reu compileu seu search_reverseu lenu spanu None( u selfu Equalu lineu prog( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_search_reverse] s ("""u% ReverseSearchTest.test_search_reverseN( u __name__u __module__u __qualname__u test_search_reverse( u __locals__( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu ReverseSearchTest[ s u ReverseSearchTestc B s\ | Ee Z d Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d S( u SearchEngineTestc C s t j d d � | _ d S( Nu root( u seu SearchEngineu Noneu engine( u self( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu setUpk s u SearchEngineTest.setUpc C sW | j } | j } | | j � d � | j d � | | j � d � | | j � d � | j j d � | | j � d � | | j � d � | j j d � | | j � d � | | j � d � | j j d � | | j � d � | | j � d � | j j d � | | j � d � | | j � d � | j j d � | | j � d � d S( Nu u helloi i FT( u engineu assertEqualu getpatu setpatu isreu Falseu revaru setu Trueu iscaseu casevaru iswordu wordvaru iswrapu wrapvaru isbacku backvar( u selfu engineu Equal( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_is_getp s( u SearchEngineTest.test_is_getc C sc | j } | j d � | j | j � d � | j j d � | j d � | j | j � d � d S( Nu \si u \\s( u engineu setcookedpatu assertEqualu getpatu revaru set( u selfu engine( ( uH /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_searchengine.pyu test_setcookedpat� s u"