Convert most of the collection code from py.path to pathlib

This commit is contained in:
Ran Benita
2020-12-19 14:52:10 +02:00
parent 4faed28261
commit ca4effc822
5 changed files with 77 additions and 75 deletions

View File

@@ -212,12 +212,12 @@ class TestCollectFS:
bindir = "Scripts" if sys.platform.startswith("win") else "bin"
# no bin/activate, not a virtualenv
base_path = pytester.mkdir("venv")
assert _in_venv(py.path.local(base_path)) is False
assert _in_venv(base_path) is False
# with bin/activate, totally a virtualenv
bin_path = base_path.joinpath(bindir)
bin_path.mkdir()
bin_path.joinpath(fname).touch()
assert _in_venv(py.path.local(base_path)) is True
assert _in_venv(base_path) is True
def test_custom_norecursedirs(self, pytester: Pytester) -> None:
pytester.makeini(