
    Vh                     Z    d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
  G d de
      Zy	)
z0
Tests for L{twisted.trial._dist.distreporter}.
    )StringIO)Failure)DistReporter)TreeReporter)TestCasec                   0    e Zd ZdZddZddZddZddZy)DistReporterTestsz$
    Tests for L{DistReporter}.
    Nc                     t               | _        t        t        | j                              | _        t               | _        y )N)r   streamr   r   distReporterr   testselfs    Z/home/dcms/DCMS/lib/python3.12/site-packages/twisted/trial/_dist/test/test_distreporter.pysetUpzDistReporterTests.setUp   s*    j(dkk)BCJ	    c                    | j                   j                  | j                         | j                  | j                  j                         d       | j                   j                  | j                         | j                  | j                  j                         d       | j                   j                  | j                         | j                  | j                  j                         d       y)zY
        Success output only gets sent to the stream after the test has stopped.
         N)	r   	startTestr   assertEqualr   getvalue
addSuccessstopTestassertNotEqualr   s    r   test_startSuccessStopz'DistReporterTests.test_startSuccessStop   s     	##DII.--/4$$TYY/--/4""499-DKK002B7r   c                    | j                   j                  | j                         | j                  | j                  j                         d       | j                   j                  | j                  t        t        d                   | j                  | j                  j                         d       | j                   j                  | j                         | j                  | j                  j                         d       y)zW
        Error output only gets sent to the stream after the test has stopped.
        r   errorN)r   r   r   r   r   r   addErrorr   	Exceptionr   r   r   s    r   test_startErrorStopz%DistReporterTests.test_startErrorStop%   s     	##DII.--/4""499gi6H.IJ--/4""499-DKK002B7r   c                    | j                   j                  | j                         | j                   j                  | j                  t	        t        d                   | j                   j                  | j                  t	        t        d                   | j                   j                  | j                  d       | j                   j                  | j                  d       | j                   j                  | j                  t	        t        d            d       | j                  t        | j                   j                  | j                  j                                  d       y)zh
        Calling methods of L{DistReporter} add calls to the running queue of
        the test.
        foobareggspamerr   N)r   r   r   
addFailurer   r   r   addSkipaddUnexpectedSuccessaddExpectedFailurer   lenrunningidr   s    r   test_forwardedMethodsz'DistReporterTests.test_forwardedMethods0   s    
 	##DII.$$TYY	%8H0IJ""499gi6F.GH!!$))U3..tyy&A,,IIwy/0%	
 	T..66tyy||~FGKr   )returnN)__name__
__module____qualname____doc__r   r   r    r/    r   r   r	   r	      s    
	8	8Lr   r	   N)r4   ior   twisted.python.failurer    twisted.trial._dist.distreporterr   twisted.trial.reporterr   twisted.trial.unittestr   r	   r5   r   r   <module>r;      s)     * 9 / +-L -Lr   