§
    Y¦·f„  ã                   óJ   — d Z ddlmZ ddlmZ ddlmZ  G d„ de¦  «        ZdS )	zO
Test cases for convenience functionality in L{twisted._threads._convenience}.
é    )ÚSynchronousTestCaseé   )ÚQuit)ÚAlreadyQuitc                   ó:   — e Zd ZdZd	d„Zd	d„Zd	d„Zd	d„Zd	d„ZdS )
Ú	QuitTestsz
    Tests for L{Quit}
    ÚreturnNc                 óX   — t          ¦   «         }|                      |j        d¦  «         dS )z3
        L{Quit.isSet} starts as L{False}.
        FN)r   ÚassertEqualÚisSet©ÚselfÚquits     úX/var/www/html/env/lib/python3.11/site-packages/twisted/_threads/test/test_convenience.pyÚtest_isInitiallySetzQuitTests.test_isInitiallySet   s+   € õ ‰vŒvˆØ×Ò˜œ UÑ+Ô+Ð+Ð+Ð+ó    c                 ó€   — t          ¦   «         }|                     ¦   «          |                      |j        d¦  «         dS )z<
        L{Quit.set} sets L{Quit.isSet} to L{True}.
        TN)r   Úsetr   r   r   s     r   Útest_setSetsSetzQuitTests.test_setSetsSet   s8   € õ ‰vŒvˆØŠ‰
Œ
ˆ
Ø×Ò˜œ TÑ*Ô*Ð*Ð*Ð*r   c                 ór   — t          ¦   «         }|                      |                     ¦   «         d¦  «         dS )zK
        L{Quit.check} initially does nothing and returns L{None}.
        N)r   ÚassertIsÚcheckr   s     r   Útest_checkDoesNothingzQuitTests.test_checkDoesNothing"   s/   € õ ‰vŒvˆØŠd—j’j‘l”l DÑ)Ô)Ð)Ð)Ð)r   c                 óŠ   — t          ¦   «         }|                     ¦   «          |                      t          |j        ¦  «         dS )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)   s8   € õ ‰vŒvˆØŠ‰
Œ
ˆ
Ø×Ò+ t¤zÑ2Ô2Ð2Ð2Ð2r   c                 óŠ   — t          ¦   «         }|                     ¦   «          |                      t          |j        ¦  «         dS )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   s8   € õ ‰vŒvˆØŠ‰
Œ
ˆ
Ø×Ò+ t¤xÑ0Ô0Ð0Ð0Ð0r   )r	   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   © r   r   r   r      s‚   € € € € € ðð ð,ð ,ð ,ð ,ð+ð +ð +ð +ð*ð *ð *ð *ð3ð 3ð 3ð 3ð1ð 1ð 1ð 1ð 1ð 1r   r   N)r"   Útwisted.trial.unittestr   Ú_conveniencer   Ú	_ithreadsr   r   r#   r   r   ú<module>r'      s|   ððð ð
 7Ð 6Ð 6Ð 6Ð 6Ð 6Ø Ð Ð Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #ð)1ð )1ð )1ð )1ð )1Ð#ñ )1ô )1ð )1ð )1ð )1r   