Skip to content

Commit

Permalink
Update test to reflect the new expectation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 16, 2024
1 parent 015a987 commit cc7c168
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
default_environment,
format_full_version,
)
from packaging.version import InvalidVersion

VARIABLES = [
"extra",
Expand Down Expand Up @@ -391,11 +390,10 @@ def test_extra_str_normalization(self):
assert str(Marker(rhs)) == f'extra == "{normalized_name}"'

def test_python_full_version_untagged_user_provided(self):
"""A user-provided python_full_version ending with a + fails to parse."""
with pytest.raises(InvalidVersion):
Marker("python_full_version < '3.12'").evaluate(
{"python_full_version": "3.11.1+"}
)
"""A user-provided python_full_version ending with a + is also repaired."""
assert Marker("python_full_version < '3.12'").evaluate(
{"python_full_version": "3.11.1+"}
)

def test_python_full_version_untagged(self):
with mock.patch("platform.python_version", return_value="3.11.1+"):
Expand Down

0 comments on commit cc7c168

Please sign in to comment.