
    ;e                         	 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  G d dej	                  Z
 G d d	ej	                  Zed
k    r ej        d           dS dS )    )treeN)requiresgui)Tk	EventTypeSCROLLc                   @    e Zd Zed             Zed             Zd ZdS )TreeTestc                 ^    t                      | _        | j                                         d S N)r   rootwithdrawclss    2/usr/lib/python3.11/idlelib/idle_test/test_tree.py
setUpClasszTreeTest.setUpClass   s'    44    c                 <    | j                                          | ` d S r   )r   destroyr   s    r   tearDownClasszTreeTest.tearDownClass   s    HHHr   c                    t          j        | j        ddd          }|j                            ddd           t          j        t           j                  }t          j        |j        d |          }|	                                 d S )Nwhiter      )bghighlightthickness	takefocusbothleft)expandfillside)
r   ScrolledCanvasr   framepackFileTreeItemICONDIRTreeNodecanvasr   )selfscitemnodes       r   	test_initzTreeTest.test_init   sy     I'a1F F F
QV&999 ..}RYd33r   N)__name__
__module____qualname__classmethodr   r   r-    r   r   r
   r
   
   sW          [   [    r   r
   c                       e Zd Zd ZdS )TestScrollEventc           	           G  fdd          } G d d          }t           j        dddft           j        ddd	ft           j        dd
dft           j        dd	d	ff} |            }|D ]W\  }}}}||_        ||_        ||_        t          j        | |t          |d                    }	 	                    |	d           Xd S )Nc                        e Zd Zd Z fdZdS )1TestScrollEvent.test_wheel_event.<locals>._Widgetc                     || _         d S r   )expected)widgetr9   s     r   __init__z:TestScrollEvent.test_wheel_event.<locals>._Widget.__init__%   s    "*r   c                 >                         | j        |           d S r   )assertTupleEqualr9   )r:   argsr)   s     r   yviewz7TestScrollEvent.test_wheel_event.<locals>._Widget.yview'   s!    %%fot<<<<<r   N)r.   r/   r0   r;   r?   )r)   s   r   _Widgetr7   $   s=        + + += = = = = = =r   r@   c                       e Zd ZdS )0TestScrollEvent.test_wheel_event.<locals>._EventN)r.   r/   r0   r2   r   r   _EventrB   *   s        Dr   rC   x   i      unitsbreak)
r   
MouseWheelButtonPresstypedeltanumr   wheel_eventr   assertEqual)
r)   r@   rC   testseventtyrN   rO   amountress
   `         r   test_wheel_eventz TestScrollEvent.test_wheel_event"   s   	= 	= 	= 	= 	= 	= 	= 	= 	= 	=	 	 	 	 	 	 	 	 &R4&b!4'Q3'Q24
 &+ 	+ 	+"BsFEJEKEI"5''&&'*J*JKKCS'****	+ 	+r   N)r.   r/   r0   rW   r2   r   r   r4   r4       s#        + + + + +r   r4   __main__   )	verbosity)idlelibr   unittesttest.supportr   tkinterr   r   r   TestCaser
   r4   r.   mainr2   r   r   <module>ra      s            ! ! ! ! ! !  ) ) ) ) ) ) ) ) ) )    x    ,+ + + + +h' + + +6 zHMA r   