Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))
def test_get_names_from_dir(tmpdir):
directory = tmpdir/'module'
create_module(directory)
assert get_names_from_dir('.mod1', directory) == {'a', 'aa', 'b'}
assert get_names_from_dir('.mod2', directory) == {'b', 'c', 'cc'}
assert get_names_from_dir('.mod3', directory) == {'name'}
assert get_names_from_dir('.mod4', directory) == {'.mod1.*', '.mod2.*', 'name', 'func'}
submod = directory/'submod'
assert get_names_from_dir('.submod1', submod) == {'..mod1.*', '..mod2.*', 'name', 'func'}
assert get_names_from_dir('..mod1', submod) == {'a', 'aa', 'b'}
assert get_names_from_dir('..mod2', submod) == {'b', 'c', 'cc'}
assert get_names_from_dir('..mod3', submod) == {'name'}
assert get_names_from_dir('..mod4', submod) == {'.mod1.*', '.mod2.*', 'name', 'func'}
raises(RuntimeError, lambda: get_names_from_dir('.mod_bad', directory))