We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91e471e commit cce839fCopy full SHA for cce839f
pins/tests/test_versions.py
@@ -21,6 +21,20 @@ def test_version_from_string():
21
assert version.hash == "baf3f"
22
23
24
+def test_version_from_string_too_many_hyphens():
25
+ with pytest.raises(
26
+ PinsVersionError, match="version string can only have 1 '-', but contains 2"
27
+ ):
28
+ Version.from_string("20220209T220116Z-baf3f-")
29
+
30
31
+def test_version_from_string_too_few_hyphens():
32
33
+ PinsVersionError, match="version string can only have 1 '-', but contains 0"
34
35
+ Version.from_string("20220209T220116Zbaf3f")
36
37
38
def test_version_from_string_baddate():
39
with pytest.raises(PinsVersionError, match="Invalid date part of version: bug"):
40
Version.from_string("bug-baf3f")
0 commit comments