AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/trial/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/trial/test/__pycache__/test_suppression.cpython-310.pyc
o

�b�@sVdZddlZddlmZddlmZddlmZGdd�d�ZGdd	�d	eej	�Z
dS)
z2
Tests for warning suppression features of Trial.
�N)�namedAny)�unittest)�suppressionc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�SuppressionMixinzj
    Tests for the warning suppression features of
    L{twisted.trial.unittest.SynchronousTestCase}.
    cCs|�t���dS)N)�run�pyunit�
TestResult)�self�suite�r�E/usr/lib/python3/dist-packages/twisted/trial/test/test_suppression.py�runTestsszSuppressionMixin.runTestscCst�||�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�
methodNamerrr�_loadszSuppressionMixin._loadcCs|�dd�|D�|�dS)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.
        cSsg|]}|d�qS)�messager)�.0�warningrrr�
<listcomp>2sz4SuppressionMixin._assertWarnings.<locals>.<listcomp>N)�assertEqual)r	�warnings�whichrrr�_assertWarnings#sz SuppressionMixin._assertWarningscC�D|�|�|jd��|�|jjg�}|�|tjtjtjtjg�dS)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�_emitrr�CLASS_WARNING_MSG�MODULE_WARNING_MSG�r	�
warningsShownrrr�test_setUpSuppression4���z&SuppressionMixin.test_setUpSuppressioncCr)z�
        Suppressions defined by the test method being run are applied to any
        warnings emitted while running the C{tearDown} fixture.
        rN)	r
r�TestTearDownSuppressionrrrrrr r!rrr�test_tearDownSuppressionEr$z)SuppressionMixin.test_tearDownSuppressioncCs<|�|�|jd��|�|jjg�}|�|tjtjg�dS)z�
        A suppression set on a test method prevents warnings emitted by that
        test method which the suppression matches from being emitted.
        rN)	r
r�TestSuppressionrrrrrr r!rrr�test_suppressMethodVs
�z$SuppressionMixin.test_suppressMethodcCsd|�|�|jd��|�|jjg�}|�|ddtj�|�|ddtj�|�t	|�d�dS)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.
        �testSuppressClassrr��N)
r
rr'rrrr�METHOD_WARNING_MSGr �lenr!rrr�test_suppressClassb�
z#SuppressionMixin.test_suppressClasscCsd|�|�|jd��|�|jjg�}|�|ddtj�|�|ddtj	�|�t
|�d�dS)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.
        �testSuppressModulerrr*r+N)r
r�TestSuppression2rr'rrrr,rr-r!rrr�test_suppressModulenr/z$SuppressionMixin.test_suppressModulecCsz|�|�|jd��|�|jjg�}|�|ddtj�|�|ddtj�|�|ddtj	�|�t
|�d�dS)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.
        �testOverrideSuppressClassrrr*r+�N)r
rr'rrrrr,rr r-r!rrr�test_overrideSuppressClasszsz+SuppressionMixin.test_overrideSuppressClassN)
�__name__�
__module__�__qualname__�__doc__r
rrr#r&r(r.r2r5rrrrrs
rc@s0eZdZdZed�Zed�Zed�Zed�ZdS)�SynchronousSuppressionTestsz0
    @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.SynchronousTestSuppression2N)	r6r7r8r9rrr%r'r1rrrrr:�s����r:)r9rr�twisted.python.reflectr�
twisted.trial�twisted.trial.testrr�SynchronousTestCaser:rrrr�<module>sx

Anon7 - 2022
AnonSec Team