Skip to content

Commit

Permalink
Py marker means any python not CPython
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Dec 5, 2022
1 parent 87d9a5b commit 45e1d79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/virtualenv/discovery/py_spec.py
Expand Up @@ -56,7 +56,7 @@ def _int_or_none(val):
else:
impl = groups["impl"]
if impl == "py" or impl == "python":
impl = "CPython"
impl = None
arch = _int_or_none(groups["arch"])

if not ok:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/discovery/test_py_spec.py
Expand Up @@ -46,7 +46,7 @@ def test_spec_satisfies_arch():

@pytest.mark.parametrize(
("req", "spec"),
list(itertools.combinations(["py", "CPython", "python"], 2)) + [("jython", "jython")] + [("CPython", "cpython")],
[("py", "python"), ("jython", "jython"), ("CPython", "cpython")],
)
def test_spec_satisfies_implementation_ok(req, spec):
spec_1 = PythonSpec.from_string_spec(req)
Expand All @@ -56,7 +56,7 @@ def test_spec_satisfies_implementation_ok(req, spec):


def test_spec_satisfies_implementation_nok():
spec_1 = PythonSpec.from_string_spec("python")
spec_1 = PythonSpec.from_string_spec("cpython")
spec_2 = PythonSpec.from_string_spec("jython")
assert spec_2.satisfies(spec_1) is False
assert spec_1.satisfies(spec_2) is False
Expand Down

0 comments on commit 45e1d79

Please sign in to comment.