Skip to content

Commit 6e02043

Browse files
committed
test: bpo 46028 only is a problem under very specific circumstances
1 parent 540d11a commit 6e02043

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_venv.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
import os.path
88
import shutil
9+
import sys
910

1011
import pytest
1112

@@ -160,7 +161,11 @@ def coverage_command_fixture(request):
160161

161162

162163
# https://bugs.python.org/issue46028
163-
@pytest.mark.xfail((3, 11, 0, 'alpha', 4, 0) == env.PYVERSION, reason="avoid 3.11 bug: bpo46028")
164+
@pytest.mark.xfail(
165+
(3, 11, 0, 'alpha', 4, 0) == env.PYVERSION and
166+
not os.path.exists(sys._base_executable),
167+
reason="avoid 3.11 bug: bpo46028"
168+
)
164169
class VirtualenvTest(CoverageTest):
165170
"""Tests of virtualenv considerations."""
166171

0 commit comments

Comments
 (0)