Skip to content

Commit 42bf3b0

Browse files
cdce8pPierre-Sassoulas
authored andcommitted
Fix regession with sys.path filter (2)
1 parent c85cb41 commit 42bf3b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_self.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,10 @@ def test_import_plugin_from_local_directory_if_pythonpath_cwd(tmpdir):
931931

932932
with tmpdir.as_cwd():
933933
orig_pythonpath = os.environ.get("PYTHONPATH")
934-
os.environ["PYTHONPATH"] = "."
934+
if sys.platform == "win32":
935+
os.environ["PYTHONPATH"] = "."
936+
else:
937+
os.environ["PYTHONPATH"] = f"{(orig_pythonpath or '').strip(':')}:."
935938
process = subprocess.run(
936939
[
937940
sys.executable,

0 commit comments

Comments
 (0)