Exemplo n.º 1
0
def _(func=example_test):
    # There is an underlying assumption here that a test from an
    # imported module will always have a __module__ containing a "."
    func.__module__ = "test_contains.dot_test"
    out_func = test("test")(func)

    assert not hasattr(out_func, "ward_meta")
Exemplo n.º 2
0
def _(func=example_test):
    func.__module__ = "test_contains.dot_test"
    dest = defaultdict(list)
    path = Path("p")
    test("test", _collect_into=dest, _force_path=path)(func)
    assert len(dest) == 0
Exemplo n.º 3
0
def _(func=example_test):
    dest = defaultdict(list)
    path = Path("p")
    test("test", _collect_into=dest, _force_path=path)(func)
    assert dest[path.absolute()] == [func]
Exemplo n.º 4
0
def _(func=example_test):
    func.__module__ = "its_a_test"
    out_func = test("test")(func)

    assert hasattr(out_func, "ward_meta")
Exemplo n.º 5
0
def testable_test(func):
    return test(
        "testable test description",
        _force_path=FORCE_TEST_PATH,
        _collect_into=defaultdict(list),
    )(func)