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_names_to_replace():
for code in [code_mod1, code_mod2, code_mod3]:
names = names_to_replace(Checker(ast.parse(code)))
assert names == []
for code in [code_mod4, code_submod1]:
names = names_to_replace(Checker(ast.parse(code)))
assert names == ['a', 'b', 'c', 'd']