@mock_streams('stdout')
def test_global_parallel_honors_runs_once():
 @decorators.runs_once
 def mytask():
  print 'yolo'
 with settings(hide('everything'), parallel=True):
  execute(mytask, hosts=['localhost', '127.0.0.1'])
 result = sys.stdout.getvalue()
 eq_(result, 'yolo\n')
 assert (result != 'yolo\nyolo\n')

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