Ë
    ÏªÍf„  ã                   óB   — d Z ddlmZ ddlmZ ddlmZ  G d„ de«      Zy)	zO
Test cases for convenience functionality in L{twisted._threads._convenience}.
é    )ÚSynchronousTestCaseé   )ÚQuit)ÚAlreadyQuitc                   ó8   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zy)	Ú	QuitTestsz
    Tests for L{Quit}
    Nc                 óP   — t        «       }| j                  |j                  d«       y)z3
        L{Quit.isSet} starts as L{False}.
        FN)r   ÚassertEqualÚisSet©ÚselfÚquits     úH/usr/lib/python3/dist-packages/twisted/_threads/test/test_convenience.pyÚtest_isInitiallySetzQuitTests.test_isInitiallySet   s   € ô ‹vˆØ×Ñ˜Ÿ™ UÕ+ó    c                 óp   — t        «       }|j                  «        | j                  |j                  d«       y)z<
        L{Quit.set} sets L{Quit.isSet} to L{True}.
        TN)r   Úsetr
   r   r   s     r   Útest_setSetsSetzQuitTests.test_setSetsSet   s(   € ô ‹vˆØ‰Œ
Ø×Ñ˜Ÿ™ TÕ*r   c                 óX   — t        «       }| j                  |j                  «       d«       y)zK
        L{Quit.check} initially does nothing and returns L{None}.
        N)r   ÚassertIsÚcheckr   s     r   Útest_checkDoesNothingzQuitTests.test_checkDoesNothing"   s   € ô ‹vˆØ‰d—j‘j“l DÕ)r   c                 óx   — t        «       }|j                  «        | j                  t        |j                  «       y)zU
        L{Quit.check} raises L{AlreadyQuit} if L{Quit.set} has been called.
        N)r   r   ÚassertRaisesr   r   r   s     r   Útest_checkAfterSetRaisesz"QuitTests.test_checkAfterSetRaises)   s(   € ô ‹vˆØ‰Œ
Ø×Ñœ+ t§z¡zÕ2r   c                 óx   — t        «       }|j                  «        | j                  t        |j                  «       y)zU
        L{Quit.set} raises L{AlreadyQuit} if it has been called previously.
        N)r   r   r   r   r   s     r   Útest_setTwiceRaiseszQuitTests.test_setTwiceRaises1   s(   € ô ‹vˆØ‰Œ
Ø×Ñœ+ t§x¡xÕ0r   )ÚreturnN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   © r   r   r   r      s    „ ñó,ó+ó*ó3ô1r   r   N)r"   Útwisted.trial.unittestr   Ú_conveniencer   Ú	_ithreadsr   r   r#   r   r   ú<module>r'      s"   ðñõ
 7Ý Ý #ô)1Ð#õ )1r   