Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_star_imports():
for code in [code_mod1, code_mod2, code_mod3]:
stars = star_imports(Checker(ast.parse(code)))
assert stars == []
stars = star_imports(Checker(ast.parse(code_mod4)))
assert stars == ['.mod1', '.mod2']
stars = star_imports(Checker(ast.parse(code_submod1)))
assert stars == ['..mod1', '..mod2']