Skip to content

Commit 5c8c088

Browse files
committed
test: skip the test that show Windows gets PYTHONSAFEPATH wrong
1 parent 5a609d8 commit 5c8c088

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_process.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,11 @@ def test_coverage_zip_is_like_python(self) -> None:
808808
actual = self.run_command(f"python {cov_main} run run_me.py")
809809
self.assert_tryexecfile_output(expected, actual)
810810

811+
@pytest.mark.skipif(env.PYVERSION < (3, 11), reason="PYTHONSAFEPATH is new in 3.11")
812+
@pytest.mark.skipif(
813+
env.WINDOWS,
814+
reason="Windows gets this wrong: https://github.com/python/cpython/issues/131484",
815+
)
811816
def test_pythonsafepath(self) -> None:
812817
with open(TRY_EXECFILE) as f:
813818
self.make_file("run_me.py", f.read())
@@ -816,6 +821,7 @@ def test_pythonsafepath(self) -> None:
816821
actual = self.run_command("coverage run run_me.py")
817822
self.assert_tryexecfile_output(expected, actual)
818823

824+
@pytest.mark.skipif(env.PYVERSION < (3, 11), reason="PYTHONSAFEPATH is new in 3.11")
819825
def test_pythonsafepath_dashm_runme(self) -> None:
820826
with open(TRY_EXECFILE) as f:
821827
self.make_file("run_me.py", f.read())

0 commit comments

Comments
 (0)