
    Ϫf                    l    d Z ddlmZ ddlmZ ddlmZmZmZ ddl	m
Z
  G d de
      Z G d d	e
      Zy
)zJ
Tests for the insults windowing module, L{twisted.conch.insults.window}.
    )annotations)Callable)ScrolledArea
TextOutput	TopWindow)TestCasec                      e Zd ZdZddZy)TopWindowTestszB
    Tests for L{TopWindow}, the root window container class.
    c                   g g }t        fd|j                        }| j                  g        | j                  |g        |j                          | j                  g        | j                  t	        |      d       |j                          | j                  g        | j                  t	        |      d        |j                                 | j                  t	              d       | j                  |g        |j                          | j                  t	              d       | j                  t	        |      d       y)z
        Verify that L{TopWindow.repaint} schedules an actual paint to occur
        using the scheduling object passed to its initializer.
        c                 &     j                  d       S )N)append)paintss   @/usr/lib/python3/dist-packages/twisted/conch/test/test_window.py<lambda>z5TopWindowTests.test_paintScheduling.<locals>.<lambda>   s    t!4        N)r   r   assertEqualrepaintlenpop)self	scheduledrootr   s      @r   test_paintSchedulingz#TopWindowTests.test_paintScheduling   s	   
  02	4i6F6FG 	$B' 	$Y+ 	$Y+ 		Va(B' 	Va(Y+r   NreturnNone)__name__
__module____qualname____doc__r    r   r   r
   r
      s    !,r   r
   c                      e Zd ZdZddZy)ScrolledAreaTestsz
    Tests for L{ScrolledArea}, a widget which creates a viewport containing
    another widget and can reposition that viewport using scrollbars.
    c                    t               }t        |      }| j                  |j                  |j                         | j                  |j                  j                  |       y)z
        The parent of the widget passed to L{ScrolledArea} is set to a new
        L{Viewport} created by the L{ScrolledArea} which itself has the
        L{ScrolledArea} instance as its parent.
        N)r   r   assertIsparent	_viewport)r   widgetscrolleds      r   test_parentzScrolledAreaTests.test_parent;   sG     'fmmX%7%78h((//:r   Nr   )r   r   r    r!   r+   r"   r   r   r$   r$   5   s    
	;r   r$   N)r!   
__future__r   typingr   twisted.conch.insults.windowr   r   r   twisted.trial.unittestr   r
   r$   r"   r   r   <module>r0      s4    #  L L +&,X &,R; ;r   