Exemplo n.º 1
0
def test_reset_all_hooks():
    register_hook('execute.task-executed1', inc_A)
    jug_hook('execute.task-executed1')
    assert len(A) == 1
    reset_all_hooks()
    jug_hook('execute.task-executed1')
    assert len(A) == 1
Exemplo n.º 2
0
def test_reset_all_hooks():
    register_hook('execute.task-executed1', inc_A)
    jug_hook('execute.task-executed1')
    assert len(A) == 1
    reset_all_hooks()
    jug_hook('execute.task-executed1')
    assert len(A) == 1
Exemplo n.º 3
0
def task_reset_at_exit():
    jug.task.Task.store = dict_store()
    while jug.task.alltasks:
        jug.task.alltasks.pop()

    yield

    jug.task.Task.store = None
    while jug.task.alltasks:
        jug.task.alltasks.pop()
    reset_all_hooks()
Exemplo n.º 4
0
def _teardown():
    jug.task.Task.store = None
    while jug.task.alltasks:
        jug.task.alltasks.pop()
    reset_all_hooks()
Exemplo n.º 5
0
def teardown():
    reset_all_hooks()
    del A[:] # A.clear() is not available in Python 2.x
Exemplo n.º 6
0
def teardown():
    reset_all_hooks()
    del A[:]  # A.clear() is not available in Python 2.x
Exemplo n.º 7
0
def _teardown():
    jug.task.Task.store = None
    while jug.task.alltasks:
        jug.task.alltasks.pop()
    reset_all_hooks()