@with_fakes
def test_runs_once_runs_only_once():
    func = fake_function(expect_call=True).times_called(1)
    task = decorators.runs_once(func)
    for i in range(2):
        task()
@runs_once prevents decorated func from running >1 time
dataset/ETHPy150Open fabric/fabric/tests/test_decorators.py/test_runs_once_runs_only_once