o
    ¼>hP
  ã                   @   sŽ   d Z ddlmZ ddlmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZ eeeeeef f ZeeƒG d	d
„ d
e
eƒƒƒZdS )z«
The reporter is not made to support concurrent test running, so we will
hold test results in here and only send them to the reporter once the
test is over.

@since: 12.3
é    )ÚTracebackType)ÚOptionalÚTupleÚUnion)Úimplementer)ÚproxyForInterface)ÚFailureé   )Ú	IReporterÚ	ITestCasec                	       s˜   e Zd ZdZ‡ fdd„Zdd„ Zdededd	fd
d„Zdededd	fdd„Z	dd„ Z
ddd„Z		ddededee dd	fdd„Zdd„ Zdd„ Z‡  ZS )ÚDistReporterz
    See module docstring.
    c                    s   t ƒ  |¡ i | _d S ©N)ÚsuperÚ__init__Úrunning)ÚselfÚoriginal©Ú	__class__© ú€/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/twisted/trial/_dist/distreporter.pyr       s   
zDistReporter.__init__c                 C   s.   g | j | ¡ < | j | ¡   | jj|f¡ dS )z&
        Queue test starting.
        N)r   ÚidÚappendr   Ú	startTest©r   Útestr   r   r   r   $   s    zDistReporter.startTestr   ÚfailÚreturnNc                 C   ó"   | j | ¡   | jj||f¡ dS )z)
        Queue adding a failure.
        N)r   r   r   r   Ú
addFailure)r   r   r   r   r   r   r   +   ó   "zDistReporter.addFailureÚerrorc                 C   r   )z%
        Queue error adding.
        N)r   r   r   r   ÚaddError)r   r   r!   r   r   r   r"   1   r    zDistReporter.addErrorc                 C   r   )z&
        Queue adding a skip.
        N)r   r   r   r   ÚaddSkip)r   r   Úreasonr   r   r   r#   7   r    zDistReporter.addSkipc                 C   r   )z5
        Queue adding an unexpected success.
        N)r   r   r   r   ÚaddUnexpectedSuccess)r   r   Útodor   r   r   r%   =   r    z!DistReporter.addUnexpectedSuccessr&   c                 C   s$   | j | ¡   | jj|||f¡ dS )z3
        Queue adding an expected failure.
        N)r   r   r   r   ÚaddExpectedFailure)r   r   r!   r&   r   r   r   r'   C   s   ÿzDistReporter.addExpectedFailurec                 C   s    | j | ¡   | jj|f¡ dS )z)
        Queue adding a success.
        N)r   r   r   r   Ú
addSuccessr   r   r   r   r(   M   s    zDistReporter.addSuccessc                 C   sT   | j | ¡   | jj|f¡ | j | ¡  D ]}|d |dd… Ž  q| j | ¡ = dS )zA
        Queue stopping the test, then unroll the queue.
        r   é   N)r   r   r   r   ÚstopTest)r   r   Ústepr   r   r   r*   S   s   zDistReporter.stopTestr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   ÚReporterFailurer   r"   r#   r%   r   Ústrr'   r(   r*   Ú__classcell__r   r   r   r   r      s(    
ÿÿÿÿ
þ
r   N)r/   Útypesr   Útypingr   r   r   Úzope.interfacer   Útwisted.python.componentsr   Útwisted.python.failurer   Úitrialr
   r   ÚtypeÚ	Exceptionr0   r   r   r   r   r   Ú<module>   s   