o
    ¯b@  ã                   @   s@   d Z ddlmZmZ ddlmZ ddlmZ G dd„ deƒZdS )	z,
Test cases for L{twisted.logger._capture}.
é    )ÚLoggerÚLogLevel)ÚTestCaseé   )ÚcapturedLogsc                   @   s    e Zd ZdZeƒ Zddd„ZdS )ÚLogCaptureTestsz'
    Tests for L{LogCaptureTests}.
    ÚreturnNc                 C   sÞ   t ƒ }tƒ �}| jjd|d� | jjd|d� W d  ƒ n1 s!w   Y  |  t|ƒdk¡ |  |d d d¡ |  |d d tj¡ |  |d d	 |¡ |  |d
 d d¡ |  |d
 d tj¡ |  |d
 d	 |¡ dS )z<
        Events logged within context are captured.
        zCapture this, please)ÚfoozCapture this too, pleaseNr   r   Ú
log_formatÚ	log_levelr	   é   )	Úobjectr   ÚlogÚdebugÚinfoÚ
assertTrueÚlenÚassertEqualr   )Úselfr	   Úcaptured© r   úB/usr/lib/python3/dist-packages/twisted/logger/test/test_capture.pyÚtest_capture   s   þzLogCaptureTests.test_capture)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s    r   N)	r   Útwisted.loggerr   r   Útwisted.trial.unittestr   Ú_capturer   r   r   r   r   r   Ú<module>   s
   