Exemple #1
0
def test_implicit_clear():
    implicit.clear()

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

    log = []
    def f():
        log.append(implicit.registry)
        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
    assert log[2] is None
Exemple #2
0
def test_implicit_clear():
    implicit.clear()

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

    log = []

    def f():
        log.append(implicit.registry)
        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
    assert log[2] is None
Exemple #3
0
def teardown_function(method):
    monkey.revert_incompat()
    implicit.clear()
Exemple #4
0
def teardown_function(f):
    implicit.clear()
Exemple #5
0
def teardown_function(f):
    implicit.clear()