touch up test_cmdline_python_namespace_package() test code
This commit is contained in:
parent
7feab7391d
commit
41a6ec6f31
|
@ -624,10 +624,9 @@ class TestInvocationVariants(object):
|
||||||
for p in search_path:
|
for p in search_path:
|
||||||
monkeypatch.syspath_prepend(p)
|
monkeypatch.syspath_prepend(p)
|
||||||
|
|
||||||
os.chdir('world')
|
|
||||||
# mixed module and filenames:
|
# mixed module and filenames:
|
||||||
|
os.chdir('world')
|
||||||
result = testdir.runpytest("--pyargs", "-v", "ns_pkg.hello", "ns_pkg/world")
|
result = testdir.runpytest("--pyargs", "-v", "ns_pkg.hello", "ns_pkg/world")
|
||||||
testdir.chdir()
|
|
||||||
assert result.ret == 0
|
assert result.ret == 0
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
"*test_hello.py::test_hello*PASSED*",
|
"*test_hello.py::test_hello*PASSED*",
|
||||||
|
@ -638,6 +637,7 @@ class TestInvocationVariants(object):
|
||||||
])
|
])
|
||||||
|
|
||||||
# specify tests within a module
|
# specify tests within a module
|
||||||
|
testdir.chdir()
|
||||||
result = testdir.runpytest("--pyargs", "-v", "ns_pkg.world.test_world::test_other")
|
result = testdir.runpytest("--pyargs", "-v", "ns_pkg.world.test_world::test_other")
|
||||||
assert result.ret == 0
|
assert result.ret == 0
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
|
|
Loading…
Reference in New Issue