Your IP : 3.145.55.25
o
6��fs � @ 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 �6/opt/alt/python310/lib64/python3.10/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.writelnr )�__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 s, |� � }| jr|rd�t|�|f�S t|�S r )ZshortDescriptionr �join�str)r �testZdoc_first_liner r r
�getDescription, s
zTextTestResult.getDescriptionc sF t t| ��|� | jr!| j�| �|�� | j�d� | j�� d S d S )Nz ... )r r � startTestr r r r% �flush�r r$ r r r
r&