%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_baseprocess.cpython-312.pyc

�

Ϫ�f
��F�dZddlmZddlmZmZddlmZGd�de�Zy)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��eZdZdZd�Zd�Zy)�BaseProcessTestsz�
    Tests for L{BaseProcess}, a parent class for other classes which represent
    processes which implements functionality common to many different process
    implementations.
    c�"�Gd�d�}td�}t|��}|j|�|jjjt�|j
||jjj�y)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��eZdZdZd�Zy)�:BaseProcessTests.test_callProcessExited.<locals>.FakeProtoNc��||_y�N)�reason)�selfrs  �H/usr/lib/python3/dist-packages/twisted/internet/test/test_baseprocess.py�
processExitedzHBaseProcessTests.test_callProcessExited.<locals>.FakeProto.processExiteds	��$���)�__name__�
__module__�__qualname__rr�rr�	FakeProtors���F�
%rrzfake reasonN)�RuntimeErrorr�_callProcessExited�protor�trap�assertIs�value)rrr�processs    r�test_callProcessExitedz'BaseProcessTests.test_callProcessExitedsh��	%�	%��m�,���i�k�*���"�"�6�*��
�
���!�!�,�/��
�
�f�g�m�m�2�2�8�8�9rc���Gd�d�}t�}t|��}|jtt	��g��fd�}t|�|j|��\\}}}|j
|d|j�d|j�d��|j|t�|j
|d�y)	z�
        L{BaseProcess._callProcessExited} emits a L{DeprecationWarning} if the
        object referred to by its C{proto} attribute has no C{processExited}
        method.
        c��eZdZy)�ABaseProcessTests.test_callProcessExitedMissing.<locals>.FakeProtoN)rrrrrrrr"/s��rrc�.���j|||f�yr
)�append)�message�category�
stacklevel�warningss   �r�collectz?BaseProcessTests.test_callProcessExitedMissing.<locals>.collect8s����O�O�W�h�
�;�<rz@Since Twisted 8.2, IProcessProtocol.processExited is required.  �.z must implement it.rN)�objectr�
addCleanuprrr�assertEqualrrr�DeprecationWarning)	rrrrr)r%r&r'r(s	        @r�test_callProcessExitedMissingz.BaseProcessTests.test_callProcessExitedMissing(s����	�	�����i�k�*�����(�*:�*<�=���	=�	��!��"�"�6�*�,4�)�	(�'�8�Z�����*3�*>�*>�	�@R�@R�
T�	
�
	
�
�
�h� 2�3�	
����Q�'rN)rrr�__doc__rr/rrrrrs���:�&#(rrN)	r0�twisted.internet._baseprocessr�twisted.python.deprecaterr�twisted.trial.unittestrrrrr�<module>r4s!���
6�G�+�=(�x�=(r

Zerion Mini Shell 1.0