pathlib: replace py.path.local.visit() with our own function
Part of reducing dependency on `py`. Also enables upcoming improvements. In cases where there are simpler alternatives (in tests), I used those. What's left are a couple of uses in `_pytest.main` and `_pytest.python` and they only have modest requirements, so all of the featureful code from py is not needed.
This commit is contained in:
@@ -142,14 +142,14 @@ class TestFillFixtures:
|
||||
p = testdir.copy_example()
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
result = testdir.runpytest(next(p.visit("test_*.py")))
|
||||
result = testdir.runpytest(str(next(Path(str(p)).rglob("test_*.py"))))
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
def test_extend_fixture_conftest_conftest(self, testdir):
|
||||
p = testdir.copy_example()
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
result = testdir.runpytest(next(p.visit("test_*.py")))
|
||||
result = testdir.runpytest(str(next(Path(str(p)).rglob("test_*.py"))))
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
def test_extend_fixture_conftest_plugin(self, testdir):
|
||||
|
||||
Reference in New Issue
Block a user