File: //usr/lib/python3/dist-packages/twisted/runner/test/__pycache__/test_procmontap.cpython-310.pyc
o
�b� � @ sJ d Z ddlmZ ddlmZ ddlmZ ddlm Z G dd� de j
�ZdS ) z)
Tests for L{twisted.runner.procmontap}.
� )�
UsageError)�
procmontap)�ProcessMonitor)�unittestc @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dS )�ProcessMonitorTapTestsz]
Tests for L{twisted.runner.procmontap}'s option parsing and makeService
method.
c C s t �� }| �t|jg � dS )z>
The command line arguments must be provided.
N)�tap�Options�assertRaisesr �parseOptions��self�opt� r �E/usr/lib/python3/dist-packages/twisted/runner/test/test_procmontap.py�test_commandLineRequired s z/ProcessMonitorTapTests.test_commandLineRequiredc C �* t �� }|�g d�� | �|d d� dS )za
The threshold option is recognised as a parameter and coerced to
float.
)z--threshold�7.5�foo� threshold� @N�r r r
�assertEqualr r r r �test_threshold � z%ProcessMonitorTapTests.test_thresholdc C r )zX
The killtime option is recognised as a parameter and coerced to float.
)z
--killtimer r �killtimer Nr r r r r �
test_killTime$ s z$ProcessMonitorTapTests.test_killTimec C r )zg
The minrestartdelay option is recognised as a parameter and coerced to
float.
)z--minrestartdelayr r �minrestartdelayr Nr r r r r �test_minRestartDelay, r z+ProcessMonitorTapTests.test_minRestartDelayc C r )zg
The maxrestartdelay option is recognised as a parameter and coerced to
float.
)z--maxrestartdelayr r �maxrestartdelayr Nr r r r r �test_maxRestartDelay5 r z+ProcessMonitorTapTests.test_maxRestartDelayc C sX t �� }|�dg� | �|d d� | �|d d� | �|d d� | �|d d� d S )
z8
The parameters all have default values
r r � r � r r i Nr r r r r �test_parameterDefaults>