File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -387,6 +387,9 @@ def test_version_range_lexicographic():
387387
388388def test_version_range_libversion ():
389389 assert LibversionVersion ("1.2.3" ) in LibversionVersionRange .from_string ("vers:libversion/*" )
390- assert LibversionVersion ("1.2.3" ) in LibversionVersionRange .from_string (
391- "vers:libversion/>0.9|<2.1.0-alpha"
392- )
390+ assert LibversionVersion ("1.2.3" ) in LibversionVersionRange .from_string ("vers:libversion/>0.9|<2.1.0-alpha" )
391+ assert LibversionVersion ("1.0.0" ) in LibversionVersionRange .from_string ("vers:libversion/>=1.0.0" )
392+ assert LibversionVersion ("1.5.0" ) in LibversionVersionRange .from_string ("vers:libversion/>=1.0.0|<=1.5.0" )
393+ assert not LibversionVersion ("2.0.0" ) in LibversionVersionRange .from_string ("vers:libversion/<2.0.0" )
394+ assert not LibversionVersion ("1.2.3" ) in LibversionVersionRange .from_string ("vers:libversion/>=1.2.4" )
395+ assert LibversionVersion ("1.0.0" ) in LibversionVersionRange .from_string ("vers:libversion/!=1.1.0" )
Original file line number Diff line number Diff line change @@ -249,5 +249,14 @@ def test_lexicographic_version():
249249
250250def test_libversion_version ():
251251 assert LibversionVersion ("1.2.3" ) == LibversionVersion ("1.2.3" )
252+ assert LibversionVersion ("1.2.3" ) != LibversionVersion ("1.2.4" )
253+ assert LibversionVersion .is_valid ("1.2.3" )
254+ assert not LibversionVersion .is_valid ("1.2.3a-1-a" )
255+ assert LibversionVersion .normalize ("v1.2.3" ) == "1.2.3"
252256 assert LibversionVersion ("1.2.3" ) > LibversionVersion ("1.2.2" )
253- assert LibversionVersion ("1.2.3-alpha" ) > LibversionVersion ("1.2.2" )
257+ assert LibversionVersion ("1.2.3" ) < LibversionVersion ("1.3.0" )
258+ assert LibversionVersion ("1.2.3" ) >= LibversionVersion ("1.2.3" )
259+ assert LibversionVersion ("1.2.3" ) <= LibversionVersion ("1.2.3" )
260+ assert LibversionVersion ("1.2.3-alpha" ) < LibversionVersion ("1.2.3" )
261+ assert LibversionVersion ("1.2.3-alpha" ) != LibversionVersion ("1.2.3-beta" )
262+ assert LibversionVersion ("1.0" ) == LibversionVersion ("1.0.0" )
You can’t perform that action at this time.
0 commit comments