Skip to content

Commit 225ea45

Browse files
authored
Specify rootdir to recursive pytest calls (#113)
- fixes #110 - related to pytest-dev/pytest#11781
1 parent 06ebccd commit 225ea45

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Fixes
44
- handle dependency markers with the same alias name (see [#71](https://github.com/pytest-dev/pytest-order/issues/71))
5+
- specify rootdir to recursive pytest calls to avoid searching a large directory tree unnecessarily (see [#110](https://github.com/pytest-dev/pytest-order/issues/110))
56

67
## Infrastructure
78
- avoid unknown marker warning in tests (see [#101](https://github.com/pytest-dev/pytest-order/issues/101))

tests/test_xdist_handling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def test_first_string():
5959
)
6060
)
6161
# With `loadfile`, the tests should pass
62-
args = ["-n3", "--dist=loadfile", str(tmpdir)]
62+
args = ["-n3", "--dist=loadfile", f"--rootdir={tmpdir}", str(tmpdir)]
6363
ret = pytest.main(args, [pytest_order])
6464
assert ret == 0
6565

6666
# Without `loadfile`, the tests should fail
67-
args = ["-n3", str(tmpdir)]
67+
args = ["-n3", f"--rootdir={tmpdir}", str(tmpdir)]
6868
ret = pytest.main(args, [pytest_order])
6969
assert ret == 1

0 commit comments

Comments
 (0)