#NEWLINE# @ mock_streams ( 'stdout' ) #NEWLINE# def test_global_parallel_honors_runs_once( ) : #NEWLINE# #INDENT# '\n    fab -P (or env.parallel) should honor @runs_once\n    ' #NEWLINE# @ decorators . runs_once #NEWLINE# def mytask( ) : #NEWLINE# #INDENT# print ( 'yolo' ) #NEWLINE# #UNINDENT# with settings ( hide ( 'everything' ) , parallel = True ) : #NEWLINE# #INDENT# execute ( mytask , hosts = [ 'localhost' , '127.0.0.1' ] ) #NEWLINE# #UNINDENT# result = sys . stdout . getvalue ( ) #NEWLINE# eq_ ( result , 'yolo\n' ) #NEWLINE# assert ( result != 'yolo\nyolo\n' )