diff options
author | Christian Boelsen <christian.boelsen@hds.com> | 2017-09-13 17:14:24 +0100 |
---|---|---|
committer | Christian Boelsen <christian.boelsen@hds.com> | 2017-09-13 17:15:32 +0100 |
commit | 14b6380e5f8c2e26aa518de8a499978eb9601848 (patch) | |
tree | fbbbb5e8c596c81b0681c7138831aaf586750c4c /testing | |
parent | 70cdfaf66107f0b30c33a8dc5232b100ffa8ff0c (diff) | |
download | pytest-14b6380e5f8c2e26aa518de8a499978eb9601848.tar.gz |
Fix #2775 - running pytest with "--pyargs" will result in Items with empty "parent.nodeid" if run from a different root directory
Diffstat (limited to 'testing')
-rw-r--r-- | testing/acceptance_test.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 712776906..8a8c32762 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -624,8 +624,10 @@ class TestInvocationVariants(object): for p in search_path: monkeypatch.syspath_prepend(p) + os.chdir('world') # mixed module and filenames: - result = testdir.runpytest("--pyargs", "-v", "ns_pkg.hello", "world/ns_pkg") + result = testdir.runpytest("--pyargs", "-v", "ns_pkg.hello", "ns_pkg/world") + testdir.chdir() assert result.ret == 0 result.stdout.fnmatch_lines([ "*test_hello.py::test_hello*PASSED", |