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
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)
def v(): return core.Vulture(verbose=True)