Esempio n. 1
0
def check_min_confidence(code, min_confidence, expected):
    v = core.Vulture(verbose=True)
    v.scan(code)
    detected = dict(
        (item.name, item.confidence)
        for item in v.get_unused_code(min_confidence=min_confidence))
    assert detected == expected
Esempio n. 2
0
def check_ignore(code, ignore_names, ignore_decorators, expected):
    v = core.Vulture(
        verbose=True,
        ignore_names=ignore_names,
        ignore_decorators=ignore_decorators,
    )
    v.scan(code)
    check(v.get_unused_code(), expected)
Esempio n. 3
0
def v():
    return core.Vulture(verbose=True)