summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorrkucsora <kucsora.robert@gmail.com>2022-07-23 17:51:16 +0200
committerGitHub <noreply@github.com>2022-07-23 08:51:16 -0700
commit76a8c87ef4d162e542e3c6cbec3db4fe43bb0ecb (patch)
tree0c2eeec659ca4e08ae7b95aae1c3c27fdeeff882 /tests
parentb2a9579393831ac9332cc63c42d06d1c7265827e (diff)
downloadvirtualenv-76a8c87ef4d162e542e3c6cbec3db4fe43bb0ecb.tar.gz
Fix test_py_info to work on Python 3.11 too (#2380)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/discovery/py_info/test_py_info.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/discovery/py_info/test_py_info.py b/tests/unit/discovery/py_info/test_py_info.py
index c82e506..5bbdb31 100644
--- a/tests/unit/discovery/py_info/test_py_info.py
+++ b/tests/unit/discovery/py_info/test_py_info.py
@@ -346,7 +346,8 @@ def test_custom_venv_install_scheme_is_prefered(mocker):
"venv": venv_scheme,
}
if getattr(sysconfig, "get_preferred_scheme", None):
- sysconfig_install_schemes[sysconfig.get_preferred_scheme("prefix")] = default_scheme
+ # define the prefix as sysconfig.get_preferred_scheme did before 3.11
+ sysconfig_install_schemes["nt" if os.name == "nt" else "posix_prefix"] = default_scheme
if sys.version_info[0] == 2:
sysconfig_install_schemes = _stringify_schemes_dict(sysconfig_install_schemes)