#NEWLINE# def test_basic( ) : #NEWLINE# #INDENT# logger = logging . getLogger ( 'experiment' ) #NEWLINE# with CaptureLog ( 'experiment' ) as captured : #NEWLINE# #INDENT# logger . warning ( 'Hello' ) #NEWLINE# #UNINDENT# assert ( len ( captured . records ) == 1 ) #NEWLINE# assert ( captured . records [ 0 ] . name == 'experiment' ) #NEWLINE# assert ( captured . records [ 0 ] . msg == 'Hello' ) #NEWLINE# assert ( captured . records [ 0 ] . getMessage ( ) == 'Hello' )