Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ 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 : |
o �b � @ sV d Z ddlZddlmZ ddlmZ ddlmZ G dd� d�ZG dd � d eej �Z dS ) z2 Tests for warning suppression features of Trial. � N)�namedAny)�unittest)�suppressionc @ sX e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� ZdS )�SuppressionMixinzj Tests for the warning suppression features of L{twisted.trial.unittest.SynchronousTestCase}. c C s |� t�� � d S )N)�run�pyunit� TestResult)�self�suite� r �E/usr/lib/python3/dist-packages/twisted/trial/test/test_suppression.py�runTests s zSuppressionMixin.runTestsc C s t �||�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� methodNamer r r �_load s zSuppressionMixin._loadc C s | � 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. c S s g | ]}|d �qS )�messager )�.0�warningr r r � <listcomp>2 s z4SuppressionMixin._assertWarnings.<locals>.<listcomp>N)�assertEqual)r �warnings�whichr r r �_assertWarnings# s z SuppressionMixin._assertWarningsc C �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�_emitr r �CLASS_WARNING_MSG�MODULE_WARNING_MSG�r � warningsShownr r r �test_setUpSuppression4 � ��z&SuppressionMixin.test_setUpSuppressionc C 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! r r r �test_tearDownSuppressionE r$ z)SuppressionMixin.test_tearDownSuppressionc C s<