From b18e462e59998eaeab7b9183581e90b3382f6625 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Sat, 3 Dec 2022 13:23:27 +0000 Subject: [PATCH] Testcase for complex marker parse Demonstrating that this series of commits does find simplifications not previously found. --- tests/version/test_markers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/version/test_markers.py b/tests/version/test_markers.py index f1ac3d47a..2ff219b89 100644 --- a/tests/version/test_markers.py +++ b/tests/version/test_markers.py @@ -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",