#NEWLINE# def assert_stderr( expected ) : #NEWLINE# #INDENT# string = sys . stderr . getvalue ( ) #NEWLINE# sys . stderr . seek ( 0 ) #NEWLINE# sys . stderr . truncate ( ) #NEWLINE# assert_equals ( string , string )