← Back
Editing: test_warning.cpython-38.pyc
U W[�A � @ s� d Z ddlmZmZ ddlZddlZddlmZ ddlm Z ddlmZ ddl mZ ddlmZmZ G d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZdS )z? Tests for Trial's interaction with the Python warning system. � )�division�absolute_importN)� TestResult)�NativeStringIO)�FilePath)�SynchronousTestCase)�_collectWarnings�_setWarningRegistryToNonec @ 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'