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_get_names():
names = get_names(code_mod1)
assert names == {'a', 'aa', 'b'}
names = get_names(code_mod2)
assert names == {'b', 'c', 'cc'}
names = get_names(code_mod3)
assert names == {'name'}
names = get_names(code_mod4)
# TODO: Remove the imported name 'name'
assert names == {'.mod1.*', '.mod2.*', 'name', 'func'}
names = get_names(code_submod1)
# TODO: Remove the imported name 'name'
assert names == {'..mod1.*', '..mod2.*', 'name', 'func'}
raises(SyntaxError, lambda: get_names(code_bad_syntax))
def test_get_names():
names = get_names(code_mod1)
assert names == {'a', 'aa', 'b'}
names = get_names(code_mod2)
assert names == {'b', 'c', 'cc'}
names = get_names(code_mod3)
assert names == {'name'}
names = get_names(code_mod4)
# TODO: Remove the imported name 'name'
assert names == {'.mod1.*', '.mod2.*', 'name', 'func'}
names = get_names(code_submod1)
# TODO: Remove the imported name 'name'
assert names == {'..mod1.*', '..mod2.*', 'name', 'func'}
raises(SyntaxError, lambda: get_names(code_bad_syntax))
def test_get_names():
names = get_names(code_mod1)
assert names == {'a', 'aa', 'b'}
names = get_names(code_mod2)
assert names == {'b', 'c', 'cc'}
names = get_names(code_mod3)
assert names == {'name'}
names = get_names(code_mod4)
# TODO: Remove the imported name 'name'
assert names == {'.mod1.*', '.mod2.*', 'name', 'func'}
names = get_names(code_submod1)
# TODO: Remove the imported name 'name'
assert names == {'..mod1.*', '..mod2.*', 'name', 'func'}
raises(SyntaxError, lambda: get_names(code_bad_syntax))
def test_get_names():
names = get_names(code_mod1)
assert names == {'a', 'aa', 'b'}
names = get_names(code_mod2)
assert names == {'b', 'c', 'cc'}
names = get_names(code_mod3)
assert names == {'name'}
names = get_names(code_mod4)
# TODO: Remove the imported name 'name'
assert names == {'.mod1.*', '.mod2.*', 'name', 'func'}
names = get_names(code_submod1)
# TODO: Remove the imported name 'name'
assert names == {'..mod1.*', '..mod2.*', 'name', 'func'}
raises(SyntaxError, lambda: get_names(code_bad_syntax))
def test_get_names():
names = get_names(code_mod1)
assert names == {'a', 'aa', 'b'}
names = get_names(code_mod2)
assert names == {'b', 'c', 'cc'}
names = get_names(code_mod3)
assert names == {'name'}
names = get_names(code_mod4)
# TODO: Remove the imported name 'name'
assert names == {'.mod1.*', '.mod2.*', 'name', 'func'}
names = get_names(code_submod1)
# TODO: Remove the imported name 'name'
assert names == {'..mod1.*', '..mod2.*', 'name', 'func'}
raises(SyntaxError, lambda: get_names(code_bad_syntax))