+
    DfjI                        R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
 ^ RIHt ^ RIHt ^ RIHtHtHt ^ RIHt  ! R	 R
4      t]
! R4      t]
! R4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )z?
Tests for Trial's interaction with the Python warning system.
)annotationsN)StringIO)MappingSequenceTypeVar)
TestResult)FilePath)_collectWarnings_setWarningRegistryToNone_Warning)SynchronousTestCasec                  0    ] tR t^tRt ! R R]4      tRtR# )MaskzI
Hide a test case definition from trial's automatic discovery mechanism.
c                  F    ] tR t^t$ RtRt]tR]R&   R R lt	R R lt
R	tR
# )Mask.MockTestsz
A test case which is used by L{FlushWarningsTests} to verify behavior
which cannot be verified by code inside a single test method.
some warning textztype[Warning]categoryc                   V ^8  d   QhRR/#    returnNone )formats   "A/usr/lib/python3/dist-packages/twisted/trial/test/test_warning.py__annotate__Mask.MockTests.__annotate__&   s     	7 	7D 	7    c                \    \         P                  ! V P                  V P                  4       R# )z(
Generate a warning and don't flush it.
N)warningswarnmessager   selfs   &r   test_unflushedMask.MockTests.test_unflushed&   s     MM$,,6r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r   ,   s     	; 	;$ 	;r   c                    \         P                  ! V P                  V P                  4       V P	                  \        V P                  4       4      ^4       R# )z"
Generate a warning and flush it.
N)r   r    r!   r   assertEquallenflushWarningsr"   s   &r   test_flushedMask.MockTests.test_flushed,   s8     MM$,,6S!3!3!56:r   r   N)__name__
__module____qualname____firstlineno____doc__r!   UserWarningr   __annotations__r$   r+   __static_attributes__r   r   r   	MockTestsr      s'    	
 &"---	7	; 	;r   r5   r   N)r-   r.   r/   r0   r1   r   r5   r4   r   r   r   r   r      s    ;' ; ;r   r   _K_Vc                      ] tR t^8tRtR R ltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$tR%# )&FlushWarningsTestszY
Tests for C{flushWarnings}, an API for examining the warnings
emitted so far in a test.
c               $    V ^8  d   QhRRRRRR/# )r   setzMapping[_K, _V]subsetr   r   r   )r   s   "r   r   FlushWarningsTests.__annotate__>   s"     ( (O (_ (QU (r   c                h    VP                  4        F  w  r4V P                  W,          V4       K  	  R# )zw
Assert that all the keys present in C{subset} are also present in
C{set} and that the corresponding values are equal.
N)itemsr(   )r#   r;   r<   kvs   &&&  r   assertDictSubset#FlushWarningsTests.assertDictSubset>   s(    
 LLNDASVQ' #r   c               $    V ^8  d   QhRRRRRR/# )r   setszSequence[Mapping[_K, _V]]subsetsr   r   r   )r   s   "r   r   r=   F   s$     
( 
(-
(8Q
(	
(r   c                    V P                  \        V4      \        V4      4       \        W4       F  w  r4V P                  W44       K  	  R# )z
For each pair of corresponding elements in C{sets} and C{subsets},
assert that the element from C{subsets} is a subset of the element from
C{sets}.
N)r(   r)   ziprB   )r#   rE   rF   abs   &&&  r   assertDictSubsets$FlushWarningsTests.assertDictSubsetsF   s;     	TCL1&DA!!!' 'r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   R   s     3 34 3r   c                F    V P                  V P                  4       . 4       R# )zO
If no warnings are emitted by a test, C{flushWarnings} returns an empty
list.
N)r(   r*   r"   s   &r   	test_noneFlushWarningsTests.test_noneR   s    
 	++-r2r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   Y   s     
 
d 
r   c                    Rp\         p\        P                  ! WR7       Rp\        p\        P                  ! W4R7       V P	                  V P                  4       RVRV/RVRV/.4       R# )zd
If several warnings are emitted by a test, C{flushWarnings} returns a
list containing all of them.
zfirst warning messager!   r   zsecond warning messager   r!   N)r2   r   r    RuntimeWarningrK   r*   )r#   firstMessagefirstCategorysecondMessagesecondCategorys   &    r   test_severalFlushWarningsTests.test_severalY   sg    
 /#lC0'mE ]I|D^YF	
r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   n   s     
 
t 
r   c                    Rp\         p\        ^4       F  p\        P                  ! WR7       K  	  V P	                  V P                  4       RVRV/.^,          4       R# )zr
The same warning triggered twice from the same place is included twice
in the list returned by C{flushWarnings}.
the messagerS   r   r!   N)rT   ranger   r    rK   r*   )r#   r!   r   is   &   r   test_repeated FlushWarningsTests.test_repeatedn   sX    
  !qAMM'=  	 J)W#M"NQR"R	
r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   |   s     3 3d 3r   c                    Rp\         p\        P                  ! WR7       V P                  V P	                  4       RVRV/.4       V P                  V P	                  4       . 4       R# )zq
After a particular warning event has been returned by C{flushWarnings},
it is not returned by subsequent calls.
r]   rS   r   r!   N)rT   r   r    rK   r*   r(   )r#   r!   r   s   &  r   test_clearedFlushWarningsTests.test_cleared|   s]    
  !g9 J)W#M"N	
 	++-r2r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     0 0 0r   c                t   \        4       p\        P                  R4      pVP                  V4       V P	                  \        P                  P
                  .4      pV P                  V^ ,          R,          R4       V P                  V^ ,          R,          \        4       \        V4      P
                  P                  pVP                  pVP                  ^,           pV P                  V^ ,          R,          V4       V P                  V^ ,          R,          V4       V P                  \        V4      ^4       R# )z`
Any warnings emitted by a test which are not flushed are emitted to the
Python warning system.
r$   r!   r   r   filenamelinenoN)r   r   r5   runr*   r$   r(   assertIdenticalr2   type__code__co_filenameco_firstlinenor)   )r#   resultcasewarningsShownwhererh   ri   s   &      r   r$   !FlushWarningsTests.test_unflushed   s    
 ~~./**DNN,I,I+JKq))46IJ]1-j9;GT
))22$$ %%)q)*5x@q)(3V<]+Q/r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     0 0d 0r   c                   \        4       p\        P                  R4      p\        4       pV P	                  \
        RV4      pVP                  V4       VP                  4        V P                  VP                  4       R4       R# )z`
Any warnings emitted by a test which are flushed are not emitted to the
Python warning system.
r+   stdout N)
r   r   r5   r   patchsysrj   restorer(   getvalue)r#   rp   rq   outputmonkeys   &    r   r+   FlushWarningsTests.test_flushed   s_    
 ~~n-C62*B/r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     3 3 3r   c                z    ! R R\         4      p\        4       p\        P                  R4      pWn        \
        P                  R,          p \
        P                  ! R4       VP                  V4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          ^ ,          V4       V P                  VP                  ^ ,          ^,          P                  4       R,          P                  R4      4       V\
        P                  R&   R#   T\
        P                  R&   i ; i)	z
If a warnings filter has been installed which turns warnings into
exceptions, tests have an error added to the reporter for them for each
unflushed warning.
c                      ] tR t^tRtR# )IFlushWarningsTests.test_warningsConfiguredAsErrors.<locals>.CustomWarningr   Nr-   r.   r/   r0   r4   r   r   r   CustomWarningr          r   r   r$   NNNerrorz CustomWarning: some warning textN)Warningr   r   r5   r   r   filterssimplefilterrj   r(   r)   errorsrk   
assertTrue
splitlinesendswithr#   r   rp   rq   originalWarningss   &    r   test_warningsConfiguredAsErrors2FlushWarningsTests.test_warningsConfiguredAsErrors   s    	G 	 ~~./%#++A.	3!!'*HHVS/3  q!1!!4d;OO a #b"<= #3HQ"2HQs   CD% %D:c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     3 3 3r   c                z    ! R R\         4      p\        4       p\        P                  R4      pWn        \
        P                  R,          p \
        P                  ! R4       VP                  V4       V P                  VP                  . 4       V\
        P                  R&   R#   T\
        P                  R&   i ; i)z
If a warnings filter has been installed which turns warnings into
exceptions, tests which emit those warnings but flush them do not have
an error added to the reporter.
c                      ] tR t^tRtR# )PFlushWarningsTests.test_flushedWarningsConfiguredAsErrors.<locals>.CustomWarningr   Nr   r   r   r   r   r      r   r   r   r+   r   r   N)r   r   r   r5   r   r   r   r   rj   r(   r   r   s   &    r   &test_flushedWarningsConfiguredAsErrors9FlushWarningsTests.test_flushedWarningsConfiguredAsErrors   s    	G 	 ~~n-%#++A.	3!!'*HHVV]]B/"2HQ"2HQs   AB% %B:c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     7 7d 7r   c                   \         P                  ! R4       V P                  \        V P	                  4       4      ^4       \         P                  ! R4       V P                  \        V P	                  4       4      ^4       R# )zk
Any warnings emitted after a call to C{flushWarnings} can be flushed by
another call to C{flushWarnings}.
zfirst messagezsecond messageN)r   r    r(   r)   r*   r"   s   &r   test_multipleFlushes'FlushWarningsTests.test_multipleFlushes   sY    
 	o&T//12A6&'T//12A6r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=      s     
 
 
r   c                  aaaa Ro\         oR VV3R llpRo\        oR VV3R llpV! 4        V! 4        V P                  V P                  V.R7      RSR	S/.4       V P                  V P                  V.R7      RSR	S/.4       R
# )z
The list returned by C{flushWarnings} includes only those
warnings which refer to the source of the function passed as the value
for C{offendingFunction}, if a value is passed for that parameter.
zfirst warning textc                   V ^8  d   QhRR/# r   r   )r   s   "r   r   GFlushWarningsTests.test_filterOnOffendingFunction.<locals>.__annotate__   s     	E 	ET 	Er   c                 :   < \         P                  ! SS ^R7       R#    )
stacklevelNr   r    )rV   rU   s   r   one>FlushWarningsTests.test_filterOnOffendingFunction.<locals>.one   s    MM,!Dr   z	some textc                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s     	G 	GT 	Gr   c                 :   < \         P                  ! SS ^R7       R# r   r   )rX   rW   s   r   two>FlushWarningsTests.test_filterOnOffendingFunction.<locals>.two   s    MM-AFr   offendingFunctionsr   r!   N)r2   rT   rK   r*   )r#   r   r   rV   rU   rX   rW   s   &  @@@@r   test_filterOnOffendingFunction1FlushWarningsTests.test_filterOnOffendingFunction   s     ,#	E 	E $'	G 	G 	3%8-LAB	
 	3%8.)]CD	
r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   	  s     R R Rr   c                x    R R lpV! 4        V P                  \        V P                  V.R7      4      ^4       R# )zu
Verify that warnings emitted at the very edges of a function are still
determined to be emitted from that function.
c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   @FlushWarningsTests.test_functionBoundaries.<locals>.__annotate__  s     	/ 	/ 	/r   c                     \         P                  ! R 4       \         P                  ! R4       \         P                  ! R4       R# )zfirst line warningzinternal line warningzlast line warningNr   r   r   r   warner:FlushWarningsTests.test_functionBoundaries.<locals>.warner  s)    MM./MM12MM-.r   r   Nr(   r)   r*   )r#   r   s   & r   test_functionBoundaries*FlushWarningsTests.test_functionBoundaries	  s3    	/
 	T//F8/LMqQr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=     s     7 7D 7r   c                    \         P                  ! R4       V P                  \        V P                  R.4       V P                  \        V P	                  4       4      ^4       R# )z
If an object which is neither a function nor a method is included in the
C{offendingFunctions} list, C{flushWarnings} raises L{ValueError}.  Such
a call flushes no warnings.
oh noN)r   r    assertRaises
ValueErrorr*   r(   r)   r"   s   &r   test_invalidFilter%FlushWarningsTests.test_invalidFilter  sH     	g*d&8&84&AT//12A6r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   !  s     !N !ND !Nr   c                   \        V P                  4       P                  R4      4      P                  R4      pVP	                  4        VP                  R4      P                  R4       VP                  R4      P                  R4       VP                  4       P                  P                  R4      p\        P                  P                  ^ V4       V P                  \        P                  P                  V4       ^ RIHp V P                  \        P                  P                   R4       V P                  \        P                  P                   VP"                  4       VP                  R4      P                  4        VP%                  4        V P'                  \)        V P+                  VP$                  .4      4      ^4       R	# )
z`
Warnings emitted by a function the source code of which is not
available can still be flushed.
utf-8   twisted_private_helper   __init__.pyr   s   missingsourcefile.py7   
import warnings
def foo():
    warnings.warn("oh no")
)missingsourcefiletwisted_private_helperN)r   mktempencodechildmakedirs
setContentparentpathdecoderz   insert
addCleanupremover   r   modulespopr-   foor(   r)   r*   )r#   package	pathEntryr   s   &   r   test_missingSource%FlushWarningsTests.test_missingSource!  s=   
 4;;=//89??%
 	n%005-.99	
 NN$))009	9%3
	
 	)AB):)C)CD-.557T//1B1F1F0GHI1Mr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=   D  s     :C :CD :Cr   c                .   \        V P                  4       P                  R4      4      P                  R4      pVP	                  4        VP                  R4      P                  R4       VP                  R4      P                  R4       VP                  4       P                  P                  R4      p\        P                  P                  ^ V4       V P                  \        P                  P                  V4       ^ RIHp \        P                  R \        P                  VP                     ^ R	IHp V! 4        TP)                  VP+                  R
4      4       ^ RIHp V P                  \        P                  P.                  R4       V P                  \        P                  P.                  VP                   4       VP1                  4        V P3                  \5        V P7                  VP0                  .4      4      ^4       R#   \&         d     Li ; i)a  
Warnings emitted by a function defined in a file which has been renamed
since it was initially compiled can still be flushed.

This is testing the code which specifically supports working around the
unfortunate behavior of CPython to write a .py source file name into
the .pyc files it generates and then trust that it is correct in
various places.  If source files are renamed, .pyc files may not be
regenerated, but they will contain incorrect filenames.
r   r   r   r   s	   module.pyr   )moduler   )invalidate_cachess   twisted_renamed_helpertwisted_renamed_helperN)r   r   r   r   r   r   r   r   r   rz   r   r   r   r   r   r   r-   	importlibr   ImportErrormoveTosiblingr   r   r   r(   r)   r*   )r#   r   r   r   r   s   &    r   test_renamedSource%FlushWarningsTests.test_renamedSourceD  s~    4;;=//89??%
 	n%005l#..	
 NN$))009	9%3 	2 KK01KK(
	 3  	w'@AB 	2)AB9 	

 	T//=>B%  		s   .H HHc                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r=     s     < <T <r   c                z    RR R llpV! 4        V P                  \        V P                  V.4      4      ^4       R# )ap  
In Python 3.6 the dis.findlinestarts documented behaviour
was changed such that the reported lines might not be sorted ascending.
In Python 3.10 PEP 626 introduced byte-code change such that the last
line of a function wasn't always associated with the last byte-code.
In the past flushWarning was not detecting that such a function was
associated with any warnings.
c               $    V ^8  d   QhRRRRRR/# )r   rI   intrJ   r   r   r   )r   s   "r   r   LFlushWarningsTests.test_offendingFunctions_deep_branch.<locals>.__annotate__  s!     	 	3 	s 	4 	r   c                Z    V '       d#   V'       d   \         P                  ! R 4       R# R# R# )r   Nr   )rI   rJ   s   &&r   r   CFlushWarningsTests.test_offendingFunctions_deep_branch.<locals>.foo  s    MM'*	 r   N)r   r   r   )r#   r   s   & r   #test_offendingFunctions_deep_branch6FlushWarningsTests.test_offendingFunctions_deep_branch  s2    	 	 	T//67;r   r   N)r-   r.   r/   r0   r1   rB   rK   rO   rY   r`   rd   r$   r+   r   r   r   r   r   r   r   r   r   r4   r   r   r   r9   r9   8   sf    
(
(3
*
30.03<3,7
<R7!NF:Cx< <r   r9   c                      ] tR tRtRtR# )FakeWarningi  r   Nr   r   r   r   r   r     s    r   r   c                  b    ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )CollectWarningsTestsi  z 
Tests for L{_collectWarnings}.
c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   !CollectWarningsTests.__annotate__  s     ) )D )r   c                  aaaa RoSRRR1,          o\        ^^^4      o. oR VVVV3R llp\        SP                  V4       V P                  S^ ,          R4       \	        S^,          \
        4      '       g   Q hV P                  S^,          P                  S4       \	        S^,          \
        4      '       g   Q hV P                  S^,          P                  S4       \	        S^,          \
        4      '       g   Q hV P                  S^,          P                  \        S4      4       V P                  S^,          R4       V P                  \        S4      ^4       R# )zC
L{_collectWarnings} calls the observer with each emitted warning.
zdummy calls observer warningNc                   V ^8  d   QhRR/# r   r   )r   s   "r   r   =CollectWarningsTests.test_callsObserver.<locals>.__annotate__  s     	' 	'4 	'r   c                    < S P                  R 4       \        P                  ! S4       \        P                  ! S4       \        P                  ! S4       S P                  R4       R# )call	returningN)appendr   r    )eventsrU   rW   thirdMessages   r   f2CollectWarningsTests.test_callsObserver.<locals>.f  s?    MM&!MM,'MM-(MM,'MM+&r   r   r   r   )	r   r	   r   r(   
isinstancer   r!   strr)   )r#   r   r   rU   rW   r   s   & @@@@r   test_callsObserver'CollectWarningsTests.test_callsObserver  s    6$TrT*q!Q'')	' 	' 	*F+&)X....**L9&)X....**M:&)X....**C,=>K0Va(r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s     0 0 0r   c                    \        4       pV P                  \        RV4       \        R \        P
                  R4       V P                  VP                  4       R4       R# )z|
Any warnings emitted by a call to a function passed to
L{_collectWarnings} are not actually emitted to the warning system.
rw   c                    R # Nr   xs   &r   <lambda>6CollectWarningsTests.test_suppresses.<locals>.<lambda>  s    4r   textrx   N)r   ry   rz   r	   r   r    r(   r|   )r#   r}   s   & r   test_suppresses$CollectWarningsTests.test_suppresses  sB    
 

3&)?*B/r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s     , ,D ,r   c           	        aa . o\        4       oR VV3R llp\        R V^R^RR7      pV P                  SR
R^RR/3.4       V P                  VS4       R	# )zh
L{_collectWarnings} returns the result of calling the callable passed to
it with the parameters given.
c               $    V ^8  d   QhRRRRRR/# )r   argsobjectkwargsr   r   )r   s   "r   r   =CollectWarningsTests.test_callsFunction.<locals>.__annotate__  s!     	 	V 	v 	& 	r   c                 ,   < SP                  W34       S# r	  )r   )r  r  	argumentsvalues   *,r   r   2CollectWarningsTests.test_callsFunction.<locals>.f  s    d^,Lr   c                    R # r	  r   r
  s   &r   r  9CollectWarningsTests.test_callsFunction.<locals>.<lambda>  s    Dr   rI   d)rJ   crJ   r  N)r   rI   )r  r	   r(   rk   )r#   r   rp   r  r  s   &  @@r   test_callsFunction'CollectWarningsTests.test_callsFunction  sb    
 		 	 ".!QqCHhac0B%C$DEVU+r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s     7 7 7r   c                L   @ R R lp\        P                  ! R4       V! 4        . p\        VP                  V4       V P                  \        V4      ^4       V P                  V^ ,          P                  R4       V P                  \        V P                  4       4      ^4       R# )z
Subsequent emissions of a warning from a particular source site can be
collected by L{_collectWarnings}.  In particular, the per-module
emitted-warning cache should be bypassed (I{__warningregistry__}).
c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   ICollectWarningsTests.test_duplicateWarningCollected.<locals>.__annotate__  s     	! 	!4 	!r   c                 2    \         P                  ! R 4       R# )r   Nr   r   r   r   r   >CollectWarningsTests.test_duplicateWarningCollected.<locals>.f  s    MM% r   defaultr   N)	__warningregistry__r   r   r	   r   r(   r)   r!   r*   )r#   r   r   s   &  r   test_duplicateWarningCollected3CollectWarningsTests.test_duplicateWarningCollected  s      	! 	i(	!#*Va(**E2T//12A6r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s     	. 	.d 	.r   c                    \        4       pV\        P                  V&   V P                  \        P                  P                  V4       V P                  4        R# )z
L{_collectWarnings}'s behavior is not altered by the presence of an
object which cannot have attributes set on it as a value in
C{sys.modules}.
N)r  rz   r   r   r   r*  r#   keys   & r   test_immutableObject)CollectWarningsTests.test_immutableObject  s;     hC-++-r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s      B  BT  Br   c                  a / o ! V3R lR4      p\        4       p\        4       pV! V4      SV&   \        4       p\        4       pV! V4      SV&   \        S4       V P                  W#WE0\        SP	                  4       4      4       R# )a  
If the dictionary passed to L{_setWarningRegistryToNone} changes size
partway through the process, C{_setWarningRegistryToNone} continues to
set C{__warningregistry__} to L{None} on the rest of the values anyway.


This might be caused by C{sys.modules} containing something that's not
really a module and imports things on setattr.  py.test does this, as
does L{twisted.python.deprecate.deprecatedModuleAttribute}.
c                  6   < ] tR tRtR R ltR V 3R lltRtR# )KCollectWarningsTests.test_setWarningRegistryChangeWhileIterating.<locals>.Ai  c                    V ^8  d   QhRRRR/# )r   r/  r  r   r   r   )r   s   "r   r   XCollectWarningsTests.test_setWarningRegistryChangeWhileIterating.<locals>.A.__annotate__	  s     , ,F ,t ,r   c                	"    WP                   R &   R# )_keyN)__dict__r.  s   &&r   __init__TCollectWarningsTests.test_setWarningRegistryChangeWhileIterating.<locals>.A.__init__	  s    (+f%r   c               $    V ^8  d   QhRRRRRR/# )r   r  r  itemr   r   r   )r   s   "r   r   r7    s!     $ $ $v $$ $r   c                	&   < R SV P                   &   R # r	  )r9  )r#   r  r>  r  s   &&&r   __setattr__WCollectWarningsTests.test_setWarningRegistryChangeWhileIterating.<locals>.A.__setattr__  s    #$))r   r   N)r-   r.   r/   r0   r;  r@  r4   )r  s   r   Ar5    s    ,$ $r   rB  N)r  r
   r(   r;   keys)r#   rB  key1key2key3key4r  s   &     @r   +test_setWarningRegistryChangeWhileIterating@CollectWarningsTests.test_setWarningRegistryChangeWhileIterating  su     %'	$ 	$ xxD'$xxD'$!!$ 	$d13qvvx=Ar   r   N)r-   r.   r/   r0   r1   r  r  r   r*  r0  rH  r4   r   r   r   r   r     s,    )80, 72	. B  Br   r   )r1   
__future__r   rz   r   ior   typingr   r   r   unittestr   twisted.python.filepathr   twisted.trial._synctestr	   r
   r   twisted.trial.unittestr   r   r6   r7   r9   r   r   r   r   r   r   <module>rQ     s~    # 
   - -  , 
 7; ;8 T]T]]<, ]<@	' 	B. Br   