File: //lib/python3/dist-packages/twisted/trial/test/__pycache__/test_warning.cpython-310.pyc
o
�b�D � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
mZ ddlm
Z
G dd � d �ZG d
d� de
�ZG dd
� d
e�ZG dd� de
�ZdS )z?
Tests for Trial's interaction with the Python warning system.
� N)�StringIO)�
TestResult)�FilePath)�_collectWarnings�_setWarningRegistryToNone)�SynchronousTestCasec @ s e Zd ZdZG dd� de�ZdS )�MaskzQ
Hide a test case definition from trial's automatic discovery mechanism.
c @ s( e Zd ZdZdZeZdd� Zdd� ZdS )zMask.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 textc C s t �| j| j� dS )z@
Generate a warning and don't flush it.
N)�warnings�warn�message�category��self� r �A/usr/lib/python3/dist-packages/twisted/trial/test/test_warning.py�test_unflushed! s zMask.MockTests.test_unflushedc C s( t �| j| j� | �t| �� �d� dS )z:
Generate a warning and flush it.
� N)r
r r r
�assertEqual�len�
flushWarningsr r r r �test_flushed'