§
    Ètºf¸  ã                   ó>   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZdS )z&
Tests for L{twisted.python.context}.
é    )Úcontext)ÚSynchronousTestCasec                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚContextTestszH
    Tests for the module-scope APIs for L{twisted.python.context}.
    c                 óT   — |                       t          j        d¦  «        ¦  «         dS )zt
        Arbitrary keys which have not been set in the context have an associated
        value of L{None}.
        ÚxN)ÚassertIsNoner   Úget©Úselfs    úX/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/test/test_context.pyÚtest_notPresentIfNotSetz$ContextTests.test_notPresentIfNotSet   s(   € ð
 	×Ò�'œ+ cÑ*Ô*Ñ+Ô+Ð+Ð+Ð+ó    c                 ór   — |                       t          j        ddit          j        d¦  «        d¦  «         dS )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_setByCallzContextTests.test_setByCall   s4   € ð
 	×Ò�œ s¨C jµ'´+¸sÑCÔCÀSÑIÔIÐIÐIÐIr   c                 ó„   — t          j        ddid„ ¦  «         |                      t          j        d¦  «        ¦  «         dS )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                  ó   — d S )N© r   r   r   ú<lambda>z2ContextTests.test_unsetAfterCall.<locals>.<lambda>%   s   € ¨€ r   N)r   r   r	   r
   r   s    r   Útest_unsetAfterCallz ContextTests.test_unsetAfterCall    s@   € õ
 	Œ�c˜3�Z  Ñ.Ô.Ð.Ø×Ò�'œ+ cÑ*Ô*Ñ+Ô+Ð+Ð+Ð+r   c                 óè   — t          ¦   «         }|                      t          j        j        |d¦  «         t          j        |d¦  «         |                      dt          j        |¦  «        ¦  «         dS )zy
        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_setDefaultzContextTests.test_setDefault(   sb   € õ
 ‰hŒhˆØ�Š�Ô2Ô6¸¸TÑBÔBÐBÝÔ˜3 Ñ$Ô$Ð$Ø×Ò˜�gœk¨#Ñ.Ô.Ñ/Ô/Ð/Ð/Ð/r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r!   r   r   r   r   r      s]   € € € € € ðð ð,ð ,ð ,ðJð Jð Jð,ð ,ð ,ð0ð 0ð 0ð 0ð 0r   r   N)r%   Útwisted.pythonr   Útwisted.trial.unittestr   r   r   r   r   ú<module>r(      sj   ððð ð
 #Ð "Ð "Ð "Ð "Ð "Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6ð#0ð #0ð #0ð #0ð #0Ð&ñ #0ô #0ð #0ð #0ð #0r   