%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_baseprocess.cpython-312.pyc |
� Ϫ�f � �F � d Z ddlmZ ddlmZmZ ddlmZ G d� 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 � � e Zd ZdZd� 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 �" � G d� d� }t d� }t |� � }|j |� |j j j t � | j ||j j j � 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 � � e Zd ZdZd� Zy)�:BaseProcessTests.test_callProcessExited.<locals>.FakeProtoNc � � || _ y �N)�reason)�selfr s �H/usr/lib/python3/dist-packages/twisted/internet/test/test_baseprocess.py� processExitedzHBaseProcessTests.test_callProcessExited.<locals>.FakeProto.processExited s � �$��� )�__name__� __module__�__qualname__r r � r r � FakeProtor s � ��F� %r r zfake reasonN)�RuntimeErrorr �_callProcessExited�protor �trap�assertIs�value)r r r �processs r �test_callProcessExitedz'BaseProcessTests.test_callProcessExited sh � � %� %� �m�,���i�k�*���"�"�6�*�� � ���!�!�,�/�� � �f�g�m�m�2�2�8�8�9r c � �� G d� d� }t � }t |� � }| j t t � � 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 � � e Zd Zy)�ABaseProcessTests.test_callProcessExitedMissing.<locals>.FakeProtoN)r r r r r r r r"