Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/poetry/core/version/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ class SingleMarker(BaseMarker):
_VERSION_LIKE_MARKER_NAME = {
"python_version",
"python_full_version",
"platform_release",
}

def __init__(
Expand Down
12 changes: 10 additions & 2 deletions tests/version/test_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,8 @@ def test_validate(
"marker, env",
[
(
'platform_release >= "9.0" and platform_release < "11.0"',
{"platform_release": "10.0"},
'python_version >= "9.0" and python_version < "11.0"',
{"python_version": "10.0"},
)
],
)
Expand All @@ -913,6 +913,14 @@ def test_parse_version_like_markers(marker: str, env: dict[str, str]) -> None:
assert m.validate(env)


def test_environment_marker_examples() -> None:
# These are the platform_release examples in PEP-508, so should always parse
parse_marker(
'platform_release == "3.14.1-x86_64-linode39" or platform_release == "14.5.0"'
' or platform_release == "1.8.0_51"'
)


@pytest.mark.parametrize(
"marker, expected",
[
Expand Down