示例#1
0
文件: test_implicit.py 项目: jean/reg
def test_implicit_clear():
    implicit.clear()

    assert implicit.lookup is None
    assert implicit.base_lookup is None

    log = []

    def f():
        log.append(implicit.lookup)
        log.append(implicit.base_lookup)

    thread = threading.Thread(target=f)
    thread.start()
    thread.join()
    assert log[0] is None
    assert log[1] is None
示例#2
0
def test_implicit_clear():
    implicit.clear()

    assert implicit.lookup is None
    assert implicit.base_lookup is None

    log = []

    def f():
        log.append(implicit.lookup)
        log.append(implicit.base_lookup)

    thread = threading.Thread(target=f)
    thread.start()
    thread.join()
    assert log[0] is None
    assert log[1] is None
示例#3
0
文件: test_implicit.py 项目: jean/reg
def teardown_function(f):
    implicit.clear()
示例#4
0
def teardown_function(f):
    implicit.clear()