ok
Direktori : /proc/thread-self/root/opt/alt/python39/lib64/python3.9/unittest/__pycache__/ |
Current File : //proc/thread-self/root/opt/alt/python39/lib64/python3.9/unittest/__pycache__/runner.cpython-39.pyc |
a ���es � @ sn d Z ddlZddlZddlZddlmZ ddlmZ dZG dd� de �Z G d d � d ej�ZG dd� de �Z dS ) z Running tests� N� )�result)�registerResultTc @ s* e Zd ZdZdd� Zdd� Zd dd�ZdS ) �_WritelnDecoratorz@Used to decorate file-like objects with a handy 'writeln' methodc C s || _ d S �N)�stream)�selfr � r �4/opt/alt/python39/lib64/python3.9/unittest/runner.py�__init__ s z_WritelnDecorator.__init__c C s |dv rt |��t| j|�S )N)r �__getstate__)�AttributeError�getattrr )r �attrr r r �__getattr__ s z_WritelnDecorator.__getattr__Nc C s |r| � |� | � d� d S �N� )�write)r �argr r r �writeln s z_WritelnDecorator.writeln)N)�__name__� __module__�__qualname__�__doc__r r r r r r r r s r c s� e Zd ZdZdZdZ� fdd�Zdd� Z� fdd �Z� fd d�Z � fdd �Z � fdd�Z� fdd�Z� fdd�Z � fdd�Zdd� Zdd� Z� ZS )�TextTestResultzhA test result class that can print formatted text results to a stream. Used by TextTestRunner. zF======================================================================zF----------------------------------------------------------------------c s8 t t| ��|||� || _|dk| _|dk| _|| _d S )Nr )�superr r r �showAll�dots�descriptions)r r r � verbosity�� __class__r r r % s zTextTestResult.__init__c C s0 |� � }| jr$|r$d�t|�|f�S t|�S d S r )ZshortDescriptionr �join�str)r �testZdoc_first_liner r r �getDescription, s zTextTestResult.getDescriptionc sB t t| ��|� | jr>| j�| �|�� | j�d� | j�� d S )Nz ... )r r � startTestr r r r% �flush�r r$ r r r r&