HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/test/__pycache__/test_context.cpython-38.pyc
U


W[��@s@dZddlmZmZddlmZddlmZGdd�de�ZdS)z&
Tests for L{twisted.python.context}.
�)�division�absolute_import)�SynchronousTestCase)�contextc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�ContextTestszH
    Tests for the module-scope APIs for L{twisted.python.context}.
    cCs|�t�d��dS)zt
        Arbitrary keys which have not been set in the context have an associated
        value of L{None}.
        �xN)�assertIsNoner�get��self�r�;/usr/lib/python3/dist-packages/twisted/test/test_context.py�test_notPresentIfNotSetsz$ContextTests.test_notPresentIfNotSetcCs |�t�dditjd�d�dS)z�
        Values may be associated with keys by passing them in a dictionary as
        the first argument to L{twisted.python.context.call}.
        r�yN)�assertEqualr�callr	r
rrr
�test_setByCallszContextTests.test_setByCallcCs(t�ddidd��|�t�d��dS)z�
        After a L{twisted.python.context.call} completes, keys specified in the
        call are no longer associated with the values from that call.
        rrcSsdS)Nrrrrr
�<lambda>'�z2ContextTests.test_unsetAfterCall.<locals>.<lambda>N)rrrr	r
rrr
�test_unsetAfterCall"sz ContextTests.test_unsetAfterCallcCs:t�}|�tjj|d�t�|d�|�dt�|��dS)zy
        A default value may be set for a key in the context using
        L{twisted.python.context.setDefault}.
        Nr)�objectZ
addCleanuprZdefaultContextDict�popZ
setDefaultrr	)r�keyrrr
�test_setDefault+szContextTests.test_setDefaultN)�__name__�
__module__�__qualname__�__doc__rrrrrrrr
rs
	rN)	rZ
__future__rrZtwisted.trial.unittestrZtwisted.pythonrrrrrr
�<module>s