Skip to content

Commit

Permalink
Testcase for complex marker parse
Browse files Browse the repository at this point in the history
Demonstrating that this series of commits does find simplifications not
previously found.
  • Loading branch information
dimbleby committed Dec 3, 2022
1 parent f6ce707 commit b18e462
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/version/test_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,16 @@ def test_empty_marker_is_found_in_complex_intersection(
assert m2.intersect(m1).is_empty()


def test_empty_marker_is_found_in_complex_parse() -> None:
marker = parse_marker(
'(python_implementation != "pypy" or python_version != "3.6") and '
'((python_implementation != "pypy" and python_version != "3.6") or'
' (python_implementation == "pypy" and python_version == "3.6")) and '
'(python_implementation == "pypy" or python_version == "3.6")'
)
assert marker.is_empty()


@pytest.mark.parametrize(
"python_version, python_full_version, "
"expected_intersection_version, expected_union_version",
Expand Down

0 comments on commit b18e462

Please sign in to comment.