|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /opt/alt-old/python27/lib64/python2.7/idlelib/idle_test/ |
Upload File : |
�
NrMac @ sy d Z d d l Z d d l Z d d l m Z m Z m Z d d l Z d d l m Z
d d l m Z m
Z
d d l m Z d � Z d � Z d d d
� � YZ d e j f d � � YZ d
e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ e d k rue j d d d d � n d S( s9 Test functions and SearchEngine class in SearchEngine.py.i����N( t
BooleanVart StringVart TclError( t SearchEngine( t Vart Mbox( t Textc C s t t _ t t _ t t _ d S( N( R t seR R R t tkMessageBox( ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt setUpModule s c C s t t _ t t _ t t _ d S( N( R R R R ( ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt tearDownModule s t Mockc B s e Z d � Z RS( c O s d S( N( ( t selft argst kwargs( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt __init__ s ( t __name__t
__module__R ( ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR s t GetTestc B s e Z d � Z RS( c C s~ t j } t t _ z[ t � } t j | � } | j | t j � | j | j | � | j t j | � | � Wd | t _ Xd S( N( R R R t gett assertIsInstancet assertIst
_searchengine( R t saved_Enginet roott engine( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt test_get# s ( R R R ( ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR ! s t GetLineColTestc B s e Z d � Z RS( c C sb | j t j d � d � | j t j d � d � | j t t j d � | j t t j d � d S(
Ns 1.0i i s 1.11i s 1.0 lineendt end( i i ( i i ( t assertEqualR t get_line_colt assertRaisest
ValueError( R ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt test_get_line_col1 s ( R R R! ( ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR / s t GetSelectionTestc B s e Z d � Z RS( c C ss t � } | j d d � d � } | | _ | j t j | � d � d � } | | _ | j t j | � d � d S( Ns 1.0s Hello World!c S s* | d k r d S| d k r d St � d S( Ns sel.firsts 1.0s sel.lasts 1.12( R ( t s( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt selK s
s 1.12c S s | d k r d St � d S( Nt inserts 1.5( R ( R# ( ( sH /opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt markS s s 1.5( s 1.0s 1.12( s 1.5s 1.5( t mockTextR% t indexR R t
get_selection( R t textR$ R&