@mock_streams('stdout')
def test_global_parallel_honors_runs_once():
    @decorators.runs_once
    def mytask():
        print("yolo") # 'Carpe diem' for stupid people!
    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"


#
# @roles
#
fab -P (or env.parallel) should honor @runs_once
dataset/ETHPy150Open fabric/fabric/tests/test_decorators.py/test_global_parallel_honors_runs_once