tests: minor sys.path cleanup

This commit is contained in:
Daniel Hahler 2019-03-22 16:20:55 +01:00
parent 475119988c
commit 05d55b86df
2 changed files with 1 additions and 3 deletions

View File

@ -34,8 +34,6 @@ class TestModule(object):
)
def test_import_prepend_append(self, testdir, monkeypatch):
syspath = list(sys.path)
monkeypatch.setattr(sys, "path", syspath)
root1 = testdir.mkdir("root1")
root2 = testdir.mkdir("root2")
root1.ensure("x456.py")

View File

@ -1335,7 +1335,7 @@ class TestEarlyRewriteBailout(object):
# Setup conditions for py's fspath trying to import pathlib on py34
# always (previously triggered via xdist only).
# Ref: https://github.com/pytest-dev/py/pull/207
monkeypatch.setattr(sys, "path", [""] + sys.path)
monkeypatch.syspath_prepend("")
monkeypatch.delitem(sys.modules, "pathlib", raising=False)
testdir.makepyfile(