← Back
Editing: sample.cpython-38.pyc
U W[k � @ s� d Z ddlmZmZ ddlZddlmZ ddlmZ G dd� dej �Z dd � Zd d� ZG dd � d ej �Z G dd� dej�ZG dd� de�ZG dd� dej �ZdS )z�This module is used by test_loader to test the Trial test loading functionality. Do NOT change the number of tests in this module. Do NOT change the names the tests in this module. � )�absolute_import�divisionN)�unittest��mergeFunctionMetadatac @ s e Zd Zdd� Zdd� ZdS )�FooTestc C s d S �N� ��selfr r �;/usr/lib/python3/dist-packages/twisted/trial/test/sample.py�test_foo s zFooTest.test_fooc C s d S r r r r r r �test_bar s zFooTest.test_barN��__name__� __module__�__qualname__r r r r r r r s r c s � fdd�}|S )z� Decorate a function without preserving the name of the original function. Always return a function with the same name. c s � | |�S r r ��args�kwargs��fnr r � nameCollision s z#badDecorator.<locals>.nameCollisionr �r r r r r �badDecorator s r c s � fdd�}t � |�S )z= Decorate a function and preserve the original name. c s � | |�S r r r r r r r ) s z$goodDecorator.<locals>.nameCollisionr r r r r � goodDecorator% s r c @ sD e Zd Zdd� Zee�Zdd� Zee�Zdd� Zee�Zdd� Z d S ) �DecorationTestc C s dS )z� This test method is decorated in a way that gives it a confusing name that collides with another method. Nr r r r r �test_badDecorator0 s z DecorationTest.test_badDecoratorc C s dS )zQ This test method is decorated in a way that preserves its name. Nr r r r r �test_goodDecorator8 s z!DecorationTest.test_goodDecoratorc C s dS )z~ This is secretly a test method and will be decorated and then renamed so test discovery can find it. Nr r r r r �renamedDecorator? s zDecorationTest.renamedDecoratorc C s dS )zJ This isn't a test, it's just here to collide with tests. Nr r r r r r G s zDecorationTest.nameCollisionN) r r r r r r r r Ztest_renamedDecoratorr r r r r r / s r c @ s e Zd Zdd� Zdd� ZdS )� PyunitTestc C s d S r r r r r r r Q s zPyunitTest.test_fooc C s d S r r r r r r r U s zPyunitTest.test_barNr r r r r r N s r c @ s e Zd Zdd� ZdS )�NotATestc C s d S r r r r r r r ] s zNotATest.test_fooN)r r r r r r r r r! Z s r! c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�AlphabetTestc C s d S r r r r r r �test_ae s zAlphabetTest.test_ac C s d S r r r r r r �test_bi s zAlphabetTest.test_bc C s d S r r r r r r �test_cm s zAlphabetTest.test_cN)r r r r# r$ r% r r r r r"