AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/trial/_dist/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/trial/_dist/__pycache__/workerreporter.cpython-310.pyc
o

�b/�@sHdZddlmZddlmZddlmZddlmZGdd�de�Z	dS)	zZ
Test reporter forwarding test results over trial distributed AMP commands.

@since: 12.3
�)�Failure)�qual)�managercommands)�
TestResultcs�eZdZdZdZ�fdd�Zdd�Zdd�Z�fd	d
�Z�fdd�Z	�fd
d�Z
�fdd�Zdd�Zd�fdd�	Z
d�fdd�	Zdd�Z�ZS)�WorkerReportera
    Reporter for trial's distributed workers. We send things not through a
    stream, but through an C{AMP} protocol's C{callRemote} method.

    @ivar _DEFAULT_TODO: Default message for expected failures and
        unexpected successes, used only if a C{Todo} is not provided.
    zTest expected to failcst���||_dS)z�
        @param ampProtocol: The communication channel with the trial
            distributed manager which collects all test results.
        @type ampProtocol: C{AMP}
        N)�super�__init__�ampProtocol)�selfr	��	__class__��D/usr/lib/python3/dist-packages/twisted/trial/_dist/workerreporter.pyrs

zWorkerReporter.__init__cCs&t|t�rt|d|d|d�S|S)zX
        Convert a C{sys.exc_info()}-style tuple to a L{Failure}, if necessary.
        �r�)�
isinstance�tupler)r
�errorr
r
r�_getFailure&s
zWorkerReporter._getFailurecCs4g}|jD]}|�|d|dt|d�g�q|S)z<
        Extract frames from a C{Failure} instance.
        rrr)�frames�extend�str)r
�failurer�framer
r
r�
_getFrames.s
"zWorkerReporter._getFramescs*t��|�|��}|jjtj|d�dS)z&
        Send a success over.
        )�testNameN)r�
addSuccess�idr	�
callRemoter�
AddSuccess)r
�testrrr
rr7szWorkerReporter.addSuccessc�bt��||�|��}|�|�}|��}t|j�}dd�|�|�D�}|jj	t
j||||d�dS)z%
        Send an error over.
        cS�g|]}|�qSr
r
��.0rr
r
r�
<listcomp>H�z+WorkerReporter.addError.<locals>.<listcomp>)rr�
errorClassrN)r�addErrorrr�getErrorMessager�typerr	rr�AddError)r
r rrrr'rrr
rr(?�


�zWorkerReporter.addErrorcr!)z&
        Send a Failure over.
        cSr"r
r
r#r
r
rr%Zr&z-WorkerReporter.addFailure.<locals>.<listcomp>)r�fail�	failClassrN)r�
addFailurerrr)rr*rr	rr�
AddFailure)r
r r-rrr.rrr
rr/Qr,zWorkerReporter.addFailurecs6t��||�t|�}|��}|jjtj||d�dS)z#
        Send a skip over.
        )r�reasonN)r�addSkiprrr	rr�AddSkip)r
r r1rrr
rr2cs
�zWorkerReporter.addSkipcCs|dur|jS|jS)zj
        Get the reason for a C{Todo}.

        If C{todo} is L{None}, return a sensible default.
        N)�
_DEFAULT_TODOr1)r
�todor
r
r�_getTodoReasonnszWorkerReporter._getTodoReasonNcs@t��|||�|��}|��}|jjtj|||�|�d�dS)z0
        Send an expected failure over.
        )rrr5N)	r�addExpectedFailurer)rr	rr�AddExpectedFailurer6)r
r rr5�errorMessagerrr
rr7ys
�z!WorkerReporter.addExpectedFailurecs4t��||�|��}|jjtj||�|�d�dS)z2
        Send an unexpected success over.
        )rr5N)r�addUnexpectedSuccessrr	rr�AddUnexpectedSuccessr6)r
r r5rrr
rr:�s
�z#WorkerReporter.addUnexpectedSuccesscCsdS)z*
        I{Don't} print a summary
        Nr
)r
r
r
r�printSummary�szWorkerReporter.printSummary)N)�__name__�
__module__�__qualname__�__doc__r4rrrrr(r/r2r6r7r:r<�
__classcell__r
r
rrrs		rN)
r@�twisted.python.failurer�twisted.python.reflectr�twisted.trial._distr�twisted.trial.reporterrrr
r
r
r�<module>s

Anon7 - 2022
AnonSec Team