+
    Dfj                     v    R t ^ RIt^ RIHt ^ RIHt ^ RIHt  ! R R4      t ! R R]]P                  4      t
R# )	z2
Tests for warning suppression features of Trial.
N)namedAny)unittest)suppressionc                   Z   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	 tR
 tRtV tR# )SuppressionMixinz^
Tests for the warning suppression features of
L{twisted.trial.unittest.SynchronousTestCase}.
c                N    VP                  \        P                  ! 4       4       R # )N)runpyunit
TestResult)selfsuites   &&E/usr/lib/python3/dist-packages/twisted/trial/test/test_suppression.pyrunTestsSuppressionMixin.runTests   s    		&##%&    c                <    \         P                  ! V! V4      .4      # )z
Return a new L{unittest.TestSuite} with a single test method in it.

@param cls: A L{TestCase} subclass defining a test method.

@param methodName: The name of the test method from C{cls}.
)r	   	TestSuite)r   cls
methodNames   &&&r   _loadSuppressionMixin._load   s     Z 122r   c                `    T P                  V Uu. uF  q3R,          NK  	  upV4       R# u upi )a  
Assert that a certain number of warnings with certain messages were
emitted in a certain order.

@param warnings: A list of emitted warnings, as returned by
    C{flushWarnings}.

@param which: A list of strings giving warning messages that should
    appear in C{warnings}.

@raise self.failureException: If the warning messages given by C{which}
    do not match the messages in the warning information in C{warnings},
    or if they do not appear in the same order.
messageN)assertEqual)r   warningswhichwarnings   &&& r   _assertWarnings SuppressionMixin._assertWarnings#   s,     	HEH),,HEuMEs   +c                D   V P                  V P                  V P                  R4      4       V P                  V P                  P                  .4      pV P                  V\        P                  \        P                  \        P                  \        P                  .4       R# )z{
Suppressions defined by the test method being run are applied to any
warnings emitted while running the C{setUp} fixture.
testSuppressMethodN)	r   r   TestSetUpSuppressionflushWarnings_emitr   r   CLASS_WARNING_MSGMODULE_WARNING_MSGr   warningsShowns   & r   test_setUpSuppression&SuppressionMixin.test_setUpSuppression4   s{    
 	djj!:!:<PQR**D,E,E,K,K+LM--..--..		
r   c                D   V P                  V P                  V P                  R4      4       V P                  V P                  P                  .4      pV P                  V\        P                  \        P                  \        P                  \        P                  .4       R# )z~
Suppressions defined by the test method being run are applied to any
warnings emitted while running the C{tearDown} fixture.
r    N)	r   r   TestTearDownSuppressionr"   r#   r   r   r$   r%   r&   s   & r   test_tearDownSuppression)SuppressionMixin.test_tearDownSuppressionE   s{    
 	djj!=!=?STU**D,H,H,N,N+OP--..--..		
r   c                   V P                  V P                  V P                  R4      4       V P                  V P                  P                  .4      pV P                  V\        P                  \        P                  .4       R# )z
A suppression set on a test method prevents warnings emitted by that
test method which the suppression matches from being emitted.
r    N)	r   r   TestSuppressionr"   r#   r   r   r$   r%   r&   s   & r   test_suppressMethod$SuppressionMixin.test_suppressMethodV   sf    
 	djj!5!57KLM**D,@,@,F,F+GH**K,J,JK	
r   c                   V P                  V P                  V P                  R4      4       V P                  V P                  P                  .4      pV P                  V^ ,          R,          \        P                  4       V P                  V^,          R,          \        P                  4       V P                  \        V4      ^4       R# )z
A suppression set on a L{SynchronousTestCase} subclass prevents warnings
emitted by any test methods defined on that class which match the
suppression from being emitted.
testSuppressClassr   N)
r   r   r/   r"   r#   r   r   METHOD_WARNING_MSGr%   lenr&   s   & r   test_suppressClass#SuppressionMixin.test_suppressClassb   s     	djj!5!57JKL**D,@,@,F,F+GHq))4k6T6TUq))4k6T6TU]+Q/r   c                   V P                  V P                  V P                  R4      4       V P                  V P                  P
                  .4      pV P                  V^ ,          R,          \        P                  4       V P                  V^,          R,          \        P                  4       V P                  \        V4      ^4       R# )z
A suppression set on a module prevents warnings emitted by any test
mewthods defined in that module which match the suppression from being
emitted.
testSuppressModuler   N)r   r   TestSuppression2r"   r/   r#   r   r   r4   r$   r5   r&   s   & r   test_suppressModule$SuppressionMixin.test_suppressModulen   s     	djj!6!68LMN**D,@,@,F,F+GHq))4k6T6TUq))4k6S6ST]+Q/r   c                   V P                  V P                  V P                  R4      4       V P                  V P                  P                  .4      pV P                  V^ ,          R,          \        P                  4       V P                  V^,          R,          \        P                  4       V P                  V^,          R,          \        P                  4       V P                  \        V4      ^4       R# )z
The suppression set on a test method completely overrides a suppression
with wider scope; if it does not match a warning emitted by that test
method, the warning is emitted, even if a wider suppression matches.
testOverrideSuppressClassr   N)r   r   r/   r"   r#   r   r   r4   r$   r%   r5   r&   s   & r   test_overrideSuppressClass+SuppressionMixin.test_overrideSuppressClassz   s     	djj!5!57RST**D,@,@,F,F+GHq))4k6T6TUq))4k6S6STq))4k6T6TU]+Q/r    N)__name__
__module____qualname____firstlineno____doc__r   r   r   r(   r,   r0   r6   r;   r?   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s=     
'3N"
"
"


0
00 0r   r   c                   Z    ] tR t^tRt]! R4      t]! R4      t]! R4      t]! R4      t	Rt
R# )SynchronousSuppressionTestsz(
@see: L{twisted.trial.test.test_tests}
z>twisted.trial.test.suppression.SynchronousTestSetUpSuppressionzAtwisted.trial.test.suppression.SynchronousTestTearDownSuppressionz9twisted.trial.test.suppression.SynchronousTestSuppressionz:twisted.trial.test.suppression.SynchronousTestSuppression2rA   N)rB   rC   rD   rE   rF   r   r!   r+   r/   r:   rG   rA   r   r   rK   rK      sF     $H 'K CO  Dr   rK   )rF   r   r	   twisted.python.reflectr   twisted.trialtwisted.trial.testr   r   SynchronousTestCaserK   rA   r   r   <module>rP      s:   
  + " *u0 u0p"2H4P4P r   