+
    Dfj                     8    R t ^ RIHt ^ RIHt  ! R R]4      tR# )z&
Tests for L{twisted.python.context}.
)context)SynchronousTestCasec                   <   a  ] tR t^t o RtR tR tR tR tRt	V t
R# )ContextTestsz@
Tests for the module-scope APIs for L{twisted.python.context}.
c                P    V P                  \        P                  ! R4      4       R# )z\
Arbitrary keys which have not been set in the context have an associated
value of L{None}.
xN)assertIsNoner   getselfs   &;/usr/lib/python3/dist-packages/twisted/test/test_context.pytest_notPresentIfNotSet$ContextTests.test_notPresentIfNotSet   s    
 	'++c*+    c                v    V P                  \        P                  ! RR/\        P                  R4      R4       R# )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
   s   &r   test_setByCallContextTests.test_setByCall   s)    
 	sCj'++sCSIr   c                    \         P                  ! RR/R 4       V P                  \         P                  ! R4      4       R# )z
After a L{twisted.python.context.call} completes, keys specified in the
call are no longer associated with the values from that call.
r   r   c                      R # )N r   r   r   <lambda>2ContextTests.test_unsetAfterCall.<locals>.<lambda>%   s    r   N)r   r   r   r	   r
   s   &r   test_unsetAfterCall ContextTests.test_unsetAfterCall    s-    
 	c3Z.'++c*+r   c                    \        4       pV P                  \        P                  P                  VR4       \        P
                  ! VR4       V P                  R\        P                  ! V4      4       R# )za
A default value may be set for a key in the context using
L{twisted.python.context.setDefault}.
Nr   )object
addCleanupr   defaultContextDictpop
setDefaultr   r	   )r   keys   & r   test_setDefaultContextTests.test_setDefault(   sP    
 h2266TB3$gkk#./r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r$   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s$     ,J,0 0r   r   N)r*   twisted.pythonr   twisted.trial.unittestr   r   r   r   r   <module>r0      s   
 # 6#0& #0r   