#NEWLINE# @ skipIf ( IS_WINDOWS , 'Streams not supported' ) #NEWLINE# @ tornado . testing . gen_test #NEWLINE# def test_copy_path( self ) : #NEWLINE# #INDENT# watcher = SomeWatcher ( stream = True ) #NEWLINE# ( yield watcher . run ( ) ) #NEWLINE# messages = [ ] #NEWLINE# resp = False #NEWLINE# start_time = time . time ( ) #NEWLINE# while ( ( time . time ( ) - start_time ) <= 5 ) : #NEWLINE# #INDENT# ( yield tornado_sleep ( 0.5 ) ) #NEWLINE# try : #NEWLINE# #INDENT# m = watcher . stream . get ( block = False ) #NEWLINE# messages . append ( m ) #NEWLINE# #UNINDENT# except Queue . Empty : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# data = '' . join ( ( s ( m [ 'data' ] ) for m in messages ) ) #NEWLINE# if ( 'XYZ' in data ) : #NEWLINE# #INDENT# resp = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# self . assertTrue ( resp ) #NEWLINE# ( yield watcher . stop ( ) )