Current File : //lib/python3/dist-packages/twisted/trial/test/__pycache__/test_suppression.cpython-312.pyc |
�
Ϫ�f � �t � d Z ddlZddlmZ ddlmZ ddlmZ G d� d� Z G d� d eej � Z
y)
z2
Tests for warning suppression features of Trial.
� N)�namedAny)�unittest)�suppressionc �F � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zy)�SuppressionMixinzj
Tests for the warning suppression features of
L{twisted.trial.unittest.SynchronousTestCase}.
c �J � |j t j � � y )N)�run�pyunit�
TestResult)�self�suites �E/usr/lib/python3/dist-packages/twisted/trial/test/test_suppression.py�runTestszSuppressionMixin.runTests s � �
� � �&�#�#�%�&� c �: � t j ||� g� S )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 �_loadzSuppressionMixin._load s � � ����Z�� 1�2�2r c �T � | j |D �cg c] }|d �� c}|� yc c}w )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 �_assertWarningsz SuppressionMixin._assertWarnings# s'