https://t.me/RX1948
Server : LiteSpeed
System : Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User : idnco5810 ( 1093)
PHP Version : 8.2.29
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/internet/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_baseprocess.cpython-310.pyc
o

�b
�@s@dZddlmZddlmZmZddlmZGdd�de�ZdS)z�
Tests for L{twisted.internet._baseprocess} which implements process-related
functionality that is useful in all platforms supporting L{IReactorProcess}.
�)�BaseProcess)�getWarningMethod�setWarningMethod)�TestCasec@s eZdZdZdd�Zdd�ZdS)�BaseProcessTestsz�
    Tests for L{BaseProcess}, a parent class for other classes which represent
    processes which implements functionality common to many different process
    implementations.
    cCsNGdd�d�}td�}t|��}|�|�|jj�t�|�||jjj�dS)z�
        L{BaseProcess._callProcessExited} calls the C{processExited} method of
        its C{proto} attribute and passes it a L{Failure} wrapping the given
        exception.
        c@seZdZdZdd�ZdS)z:BaseProcessTests.test_callProcessExited.<locals>.FakeProtoNcSs
||_dS�N)�reason)�selfr�r
�H/usr/lib/python3/dist-packages/twisted/internet/test/test_baseprocess.py�
processExiteds
zHBaseProcessTests.test_callProcessExited.<locals>.FakeProto.processExited)�__name__�
__module__�__qualname__rrr
r
r
r�	FakeProtosrzfake reasonN)�RuntimeErrorr�_callProcessExited�protor�trap�assertIs�value)r	rr�processr
r
r�test_callProcessExiteds

z'BaseProcessTests.test_callProcessExitedcs�Gdd�d�}t�}t|��}|�tt��g��fdd�}t|�|�|��\\}}}|�|d|j|jf�|�	|t
�|�|d�dS)z�
        L{BaseProcess._callProcessExited} emits a L{DeprecationWarning} if the
        object referred to by its C{proto} attribute has no C{processExited}
        method.
        c@seZdZdS)zABaseProcessTests.test_callProcessExitedMissing.<locals>.FakeProtoN)r
rrr
r
r
rr/srcs��|||f�dSr)�append)�message�category�
stacklevel��warningsr
r�collect8sz?BaseProcessTests.test_callProcessExitedMissing.<locals>.collectzXSince Twisted 8.2, IProcessProtocol.processExited is required.  %s.%s must implement it.rN)�objectr�
addCleanuprrr�assertEqualrr
r�DeprecationWarning)r	rrrrrrrr
rr�test_callProcessExitedMissing(s"


��z.BaseProcessTests.test_callProcessExitedMissingN)r
rr�__doc__rr$r
r
r
rrsrN)	r%�twisted.internet._baseprocessr�twisted.python.deprecaterr�twisted.trial.unittestrrr
r
r
r�<module>s


https://t.me/RX1948 - 2025