
    ;e	                         d Z ddlmZ ddlZddlmZ  ed           ddlmZmZm	Z	 ddlm
Z
  G d d	ej                  Zed
k    r ej        dd           dS dS )zTest search, coverage 69%.    )searchN)requiresgui)TkText
BooleanVar)searchenginec                   L    e Zd Zed             Zed             Zd Zd Zd ZdS )SearchDialogTestc                 ,    t                      | _        d S N)r   rootclss    4/usr/lib/python3.11/idlelib/idle_test/test_search.py
setUpClasszSearchDialogTest.setUpClass   s    44    c                 <    | j                                          | ` d S r   )r   destroyr   s    r   tearDownClasszSearchDialogTest.tearDownClass   s    HHHr   c                    t          j        | j                  | _        t	          j        | j        | j                  | _        d | j        _        t          | j                  | _	        | j	        
                    dd           d S )Nc                      d S r    r   r   r   <lambda>z(SearchDialogTest.setUp.<locals>.<lambda>       4 r   1.0Hello World!)r	   SearchEnginer   enginer   SearchDialogdialogbellr   textinsert)selfs    r   setUpzSearchDialogTest.setUp   sg    "/	::)$)T[AA'<OO		/////r   c                    | j         }| j                            d           |                     | j                            |                     d | j        _        | j                            d           |                     | j                            |                     | j                            d           |                     | j                            |                     | j                            d           |                     | j                            |                     | j                            d           |                     | j                            |                     t          | j	        d          | j        _
        | j                            d           |                     | j                            |                     d S )	N c                      d S r   r   r   r   r   r   z2SearchDialogTest.test_find_again.<locals>.<lambda>(   r   r   HelloGoodbyezWorld!r   Tz
W[aeiouy]r)r#   r   setpatassertFalser!   
find_againr"   
assertTruer   r   revarr%   r#   s     r   test_find_againz SearchDialogTest.test_find_again"   s   y2//55666'<7###..t445559%%%//556668$$$..t44555>***..t44555 'ty$77<(((..t4455555r   c                 j   | j         }| j                             dd           |                    ddd           |                     | j                            |                     |                    ddd           |                    ddd           |                     | j                            |                     |                    ddd           |                    ddd           |                     | j                            |                     |                    dd           d S )	Nz2.0r   selr   z1.4endz1.6z1.11)r#   r$   tag_addr/   r!   find_selection
tag_removedeleter1   s     r   test_find_selectionz$SearchDialogTest.test_find_selection;   s   y	///UE5)))22488999ue,,,UE6***22488999ue,,,UE6***22488999 	E5!!!!!r   N)	__name__
__module____qualname__classmethodr   r   r&   r2   r:   r   r   r   r   r      su          [   [0 0 06 6 62" " " " "r   r   __main__   )	verbosityexit)__doc__idlelibr   unittesttest.supportr   tkinterr   r   r   r	   TestCaser   r;   mainr   r   r   <module>rJ      s             ! ! ! ! ! !  ( ( ( ( ( ( ( ( ( (            =" =" =" =" ="x( =" =" ="~ zHMAA&&&&&& r   