o
    ¯b3  ã                   @   sH   d Z ddlZddlZddlZddlmZ ddlmZ G dd„ deƒZdS )z3
Tests for distributed trial's options management.
é    N)ÚWorkerOptions)ÚTestCasec                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚWorkerOptionsTestsz%
    Tests for L{WorkerOptions}.
    c                 C   s   t ƒ | _dS )zK
        Build an L{WorkerOptions} object to be used in the tests.
        N)r   Úoptions©Úself© r   úG/usr/lib/python3/dist-packages/twisted/trial/_dist/test/test_options.pyÚsetUp   s   zWorkerOptionsTests.setUpc                 C   s`   |   tjt ¡ ¡ t ¡ r|   tj¡ t ¡  | j g d¢¡ |  	dt ¡ ¡ |  
t ¡ ¡ dS )zd
        L{WorkerOptions} supports a subset of standard options supported by
        trial.
        )z--recursionlimitÚ2000z--disablegciÐ  N)Ú
addCleanupÚsysÚsetrecursionlimitÚgetrecursionlimitÚgcÚ	isenabledÚenabler   ÚparseOptionsÚassertEqualÚassertFalser   r   r   r	   Útest_standardOptions   s   z'WorkerOptionsTests.test_standardOptionsc                 C   s.   |   tj tj t ¡ d¡¡| j ¡ j¡ dS )zš
        L{WorkerOptions.coverdir} returns the C{coverage} child directory of
        the current directory to be used for storing coverage data.
        ÚcoverageN)r   ÚosÚpathÚrealpathÚjoinÚgetcwdr   Úcoverdirr   r   r   r	   Útest_coverage(   s   
þz WorkerOptionsTests.test_coverageN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r	   r      s
    r   )	r"   r   r   r   Útwisted.trial._dist.optionsr   Útwisted.trial.unittestr   r   r   r   r   r	   Ú<module>   s   