Skip to content

Commit

Permalink
add version range test for none scheme
Browse files Browse the repository at this point in the history
Signed-off-by: Kunz, Immanuel <immanuel.kunz@aisec.fraunhofer.de>
  • Loading branch information
immqu committed Nov 15, 2024
1 parent 19473bc commit df2d2f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_version_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit df2d2f6

Please sign in to comment.