示例#1
0
文件: test_hooks.py 项目: Javacym/jug
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
示例#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
示例#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()
示例#4
0
文件: task_reset.py 项目: Javacym/jug
def _teardown():
    jug.task.Task.store = None
    while jug.task.alltasks:
        jug.task.alltasks.pop()
    reset_all_hooks()
示例#5
0
文件: test_hooks.py 项目: Javacym/jug
def teardown():
    reset_all_hooks()
    del A[:] # A.clear() is not available in Python 2.x
示例#6
0
def teardown():
    reset_all_hooks()
    del A[:]  # A.clear() is not available in Python 2.x
示例#7
0
文件: task_reset.py 项目: wuzeen/jug
def _teardown():
    jug.task.Task.store = None
    while jug.task.alltasks:
        jug.task.alltasks.pop()
    reset_all_hooks()