#NEWLINE# def test_message_interpolates_args( self ) : #NEWLINE# #INDENT# 'Test printing actually interpolates the arguments correctly\n        ' #NEWLINE# message = 'str: %s, int: %d, float %f' #NEWLINE# arguments = ( 'bla' , 12 , 3.14 ) #NEWLINE# buf = io . StringIO ( ) #NEWLINE# with stdout_redirector ( buf ) : #NEWLINE# #INDENT# self . printer ( buf , * arguments ) #NEWLINE# #UNINDENT# self . assertRegexpMatches ( buf . getvalue ( ) , ( '.*%s.*' % ( message % arguments ) ) )