#NEWLINE# def test_show( self ) : #NEWLINE# #INDENT# 'Test showing the state\n        ' #NEWLINE# state [ 'a.b' ] = 12 #NEWLINE# state [ 'bla.bli' ] = 13 #NEWLINE# buf = io . StringIO ( ) #NEWLINE# with stdout_redirector ( self ) : #NEWLINE# #INDENT# state . show ( ) #NEWLINE# #UNINDENT# self . assertNotEqual ( len ( buf . getvalue ( ) ) , 0 ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , '\\[a\\]' ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , '\\[bla\\]' ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , 'b' ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , 'bli' ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , '12' ) #NEWLINE# self . assertRegexpMatches ( buf . getvalue ( ) , '13' )