ó
    Ö›‘h  ã                   ó�   • S r SSKrSSKJr  SSKJr   " S S\5      r SSKJr	  \	rSr\c  Sr " S	 S
\5      rg! \
 a    Sr Nf = f)z&
Tests for twisted.internet.glibbase.
é    N)ÚensureNotImported)ÚTestCasec                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	ÚEnsureNotImportedTestsé   zI
L{ensureNotImported} protects against unwanted past and future imports.
c                 ó€   • 0 nU R                  [        SU5        [        SS/S/ SQS9  U R                  USSSS.5        g)z¡
If the specified modules have never been imported, and import
prevention is requested, L{ensureNotImported} makes sure they will not
be imported in the future.
ÚmodulesÚm1Úm2ú
A message.)r
   r   Úm3©ÚpreventImportsN©ÚpatchÚsysr   ÚassertEqual©Úselfr	   s     ÚgC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/internet/test/test_glibbase.pyÚtest_ensureWhenNotImportedÚ1EnsureNotImportedTests.test_ensureWhenNotImported   sA   € ð ˆØ�
‰
”3˜	 7Ô+Ü˜4 ˜,¨ÒEWÒXØ×Ñ˜¨°TÀÑ"FÕGó    c                 óv   • 0 nU R                  [        SU5        [        SS/S5        U R                  U0 5        g)z€
If the specified modules have never been imported, and import
prevention is not requested, L{ensureNotImported} has no effect.
r	   r
   r   r   Nr   r   s     r   Ú%test_ensureWhenNotImportedDontPreventÚ<EnsureNotImportedTests.test_ensureWhenNotImportedDontPrevent   s7   € ð
 ˆØ�
‰
”3˜	 7Ô+Ü˜4 ˜,¨Ô5Ø×Ñ˜ "Õ%r   c                 ó‚   • SS0nU R                  [        SU5        [        SS/SSS/S9  U R                  USSS.5        g)zn
If the specified modules have been set to L{None} in C{sys.modules},
L{ensureNotImported} does not complain.
r   Nr	   r
   r   r   )r
   r   r   r   s     r   Útest_ensureWhenFailedToImportÚ4EnsureNotImportedTests.test_ensureWhenFailedToImport)   sF   € ð
 ˜�,ˆØ�
‰
”3˜	 7Ô+Ü˜4 ˜,¨ÀdÈDÀ\ÒRØ×Ñ˜¨°TÑ":Õ;r   c                 óì   • [        5       nSU0nU R                  [        SU5        U R                  [        [
        SS/SSS/S9nU R                  USU05        U R                  UR                  S5        g)zi
If one of the specified modules has been previously imported,
L{ensureNotImported} raises an exception.
r   r	   r
   r   r   )r   N)Úobjectr   r   ÚassertRaisesÚImportErrorr   r   Úargs)r   Úmoduler	   Úes       r   Útest_ensureFailsWhenImportedÚ3EnsureNotImportedTests.test_ensureFailsWhenImported3   sz   € ô
 “ˆØ˜�.ˆØ�
‰
”3˜	 7Ô+Ø×ÑÜÜØ�4ˆLØØ  $˜<ð ð 
ˆð 	×Ñ˜ 4¨ .Ô1Ø×Ñ˜Ÿ™ Õ1r   © N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r'   Ú__static_attributes__r)   r   r   r   r      s   † ñò	Hò&ò<õ2r   r   )Ú	gireactorzgi reactor not availablec                   ó"   • \ rS rSrSr\rS rSrg)ÚGlibReactorBaseTestséR   z‰
Tests for the private C{twisted.internet._glibbase.GlibReactorBase}
done via the public C{twisted.internet.gireactor.PortableGIReactor}
c                 óŠ   • [         R                  SS9nU R                  SUR                  5       5        UR	                  5         g)z’
C{simulate} can be called without raising any errors when there are
no delayed calls for the reactor and hence there is no defined sleep
period.
F)ÚuseGtkN)r0   ÚPortableGIReactorÚassertIsÚtimeoutÚsimulate)r   Úsuts     r   Útest_simulateÚ"GlibReactorBaseTests.test_simulateZ   s4   € ô ×)Ñ)°Ð)Ð7ˆà�‰�d˜CŸK™K›MÔ*à�‰�r   r)   N)	r*   r+   r,   r-   r.   ÚmissingGlibReactorÚskipr;   r/   r)   r   r   r2   r2   R   s   † ñð
 €Dõ
r   r2   )r.   r   Útwisted.internet._glibbaser   Útwisted.trial.unittestr   r   Útwisted.internetr0   Ú
_gireactorr#   r=   r2   r)   r   r   Ú<module>rC      se   ðñó
 å 8Ý +ô42˜Xô 42ðnÝ8ð €IàÐ ØÑØ3Ðô˜8õ øð ó Ø‚Iðús   Ÿ: ºAÁA