From df2d2f6e416ce99d3c5ca5944a4eb92b85b7d9e7 Mon Sep 17 00:00:00 2001 From: "Kunz, Immanuel" Date: Fri, 15 Nov 2024 06:23:18 +0100 Subject: [PATCH] add version range test for none scheme Signed-off-by: Kunz, Immanuel --- tests/test_version_range.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_version_range.py b/tests/test_version_range.py index 95521693..93c7403a 100644 --- a/tests/test_version_range.py +++ b/tests/test_version_range.py @@ -562,3 +562,8 @@ def test_version_range_none(): none_vers = VersionRange.from_string("vers:none/*") assert not none_vers.contains(Version("1.2.3")) assert PypiVersion("2.0.3") not in none_vers + # test for invalid all range specification + with pytest.raises(Exception): + VersionRange.from_string("vers:none/!1.2.3") + with pytest.raises(Exception): + VersionRange.from_string("vers:none/*|>1.2.3")