MCPcopy
hub / github.com/google/osv.dev / test_parse

Method test_parse

osv/ecosystems/pub_test.py:69–79  ·  view source on GitHub ↗

Test versions can be parsed.

(self)

Source from the content-addressed store, hash-verified

67 pub.Version.from_string('1.2.0'), pub.Version.from_string('1.10.0'))
68
69 def test_parse(self):
70 """Test versions can be parsed."""
71 pub.Version.from_string('0.0.0')
72 pub.Version.from_string('12.34.56')
73 pub.Version.from_string('1.2.3-alpha.1')
74 pub.Version.from_string('1.2.3-x.7.z-92')
75 pub.Version.from_string('1.2.3+build.1')
76 pub.Version.from_string('1.2.3+x.7.z-92')
77 pub.Version.from_string('1.0.0-rc-1+build-1')
78 # Tests invalid versions
79 pub.Version.from_string('3.4.0rc3-invalid')
80
81 def test_empty_identifier(self):
82 """Test parsing versions with empty identifiers.

Callers

nothing calls this directly

Calls 1

from_stringMethod · 0.45

Tested by

no test coverage detected