HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/runner/test/__pycache__/test_procmontap.cpython-38.pyc
U


W[�	�@sJdZddlmZddlmZddlmZddlmZ	Gdd�dej
�ZdS)	z)
Tests for L{twisted.runner.procmontap}.
�)�
UsageError)�unittest)�ProcessMonitor)�
procmontapc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�ProcessMonitorTapTestsz]
    Tests for L{twisted.runner.procmontap}'s option parsing and makeService
    method.
    cCst��}|�t|jg�dS)z>
        The command line arguments must be provided.
        N)�tap�OptionsZassertRaisesr�parseOptions��self�opt�r
�E/usr/lib/python3/dist-packages/twisted/runner/test/test_procmontap.py�test_commandLineRequiredsz/ProcessMonitorTapTests.test_commandLineRequiredcCs,t��}|�dddg�|�|dd�dS)za
        The threshold option is recognised as a parameter and coerced to
        float.
        z--threshold�7.5�foo�	threshold�@N�rrr	ZassertEqualr
r
r
r�test_thresholdsz%ProcessMonitorTapTests.test_thresholdcCs,t��}|�dddg�|�|dd�dS)zX
        The killtime option is recognised as a parameter and coerced to float.
        z
--killtimerr�killtimerNrr
r
r
r�
test_killTime&sz$ProcessMonitorTapTests.test_killTimecCs,t��}|�dddg�|�|dd�dS)zg
        The minrestartdelay option is recognised as a parameter and coerced to
        float.
        z--minrestartdelayrr�minrestartdelayrNrr
r
r
r�test_minRestartDelay/sz+ProcessMonitorTapTests.test_minRestartDelaycCs,t��}|�dddg�|�|dd�dS)zg
        The maxrestartdelay option is recognised as a parameter and coerced to
        float.
        z--maxrestartdelayrr�maxrestartdelayrNrr
r
r
r�test_maxRestartDelay9sz+ProcessMonitorTapTests.test_maxRestartDelaycCsXt��}|�dg�|�|dd�|�|dd�|�|dd�|�|dd�d	S)
z8
        The parameters all have default values
        rr�r�rriNrr
r
r
r�test_parameterDefaultsCsz-ProcessMonitorTapTests.test_parameterDefaultscCsBt��}|�ddddg�t�|�}|�|t�|�d|j�dS)zP
        The command line gets added as a process to the ProcessMontor.
        Zpingz-c�3z8.8.8.8zping -c 3 8.8.8.8N)rrr	ZmakeServiceZassertIsInstancerZassertInZ	processes)rr�sr
r
r�test_makeServiceOs

z'ProcessMonitorTapTests.test_makeServiceN)�__name__�
__module__�__qualname__�__doc__rrrrrrr!r
r
r
rrs
	

rN)r%Ztwisted.python.usagerZ
twisted.trialrZtwisted.runner.procmonrZtwisted.runnerrrZTestCaserr
r
r
r�<module>s