#NEWLINE# def test_change_stream( self ) : #NEWLINE# #INDENT# stream1 = StringIO ( ) #NEWLINE# stream2 = StringIO ( ) #NEWLINE# bar = ProgressBar ( ) #NEWLINE# bar . stream = stream1 #NEWLINE# bar . write ( 'foo' ) #NEWLINE# bar . stream = stream2 #NEWLINE# bar . write ( 'bar' ) #NEWLINE# self . assertEquals ( stream2 . getvalue ( ) , 'bar' )