Your IP : 216.73.216.196
�
R�Xc @ s� d d l m Z m Z m Z m Z m Z d d l m Z d d l m
Z
e
� Z e
d � Z e
d � Z
e
d � Z d e f d � � YZ d S(
i����( t log_capturet comparet
Comparisont
LogCapturet ShouldRaise( t TestCase( t getLoggert onet twos one.childt TestLog_Capturec B s� e Z e d d � e d � e � d � � � � Z d � Z e � d � � Z d � Z d � Z d � Z d � Z d
� Z
d � Z d � Z d
� Z
d � Z d � Z RS( R s one.childR c C s� t j d � t j d � t j d � t j d � | j d d d
d � | j d d � | j d d � t | j t d
� t d
� g � d S( Nt 1t 2t 3t 4t roott INFOR R s one.childs logging.LogRecord( R R R
( R R R ( R R R ( s one.childR R
( R R R ( s one.childR R
( R R R ( s one.childR R
( R t infoR R t childt checkR t recordst C( t selft l1t l2t l3( ( sT /opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_log_capture.pyt test_logging s$
c s� t � } t d � } | j } | j } z� | j } | j d � | j } | j d � t d � t � � f d � � � } | � � j | j d � � j | j d � � j | j | � � j | j | � Wd | j | � | j | � Xd S( NR i1 iE c sv t � } | j d � � j | j d � t d � } � j | j d � | j d � | j d d � | j d � d S(
NR
i R R R R ( R R R
( R R R ( R R R ( R R t assertEqualt levelR ( R R R R ( R ( sT /opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_log_capture.pyt test_method= s
( R t handlersR t setLevelR R ( R R R t before_roott before_childt old_root_levelt old_child_levelR ( ( R sT /opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_log_capture.pyt test_uninstall_properly2 s$
c C s | j t | t � � d S( N( t
failUnlesst
isinstanceR ( R t l( ( sT /opt/alt/python27/lib/python2.7/site-packages/testfixtures/tests/test_log_capture.pyt! test_decorator_returns_logcaptureZ s c si t � � � j } zF t � g � _ } t � � f d � � } | � t � j | � Wd | � _ Xd S( Nc s � j d � | j d � d S( Nt duringR R ( R R R( ( R R ( R&