summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hp.com>2015-04-17 10:07:06 +1200
committerRobert Collins <rbtcollins@hp.com>2015-04-17 10:08:54 +1200
commite4b7541598faf340c34819f9bbc553aded50806f (patch)
treef0080ef78e81cb4aa2a9847c66a0b3d341688c21
parent1b4a8bd554a65384638f06d556d8d0063800c080 (diff)
downloadpbr-e4b7541598faf340c34819f9bbc553aded50806f.tar.gz
Reinstate pure-git-hashes-are-illegal test.
When we removed output support for git hashes we also removed parsing support for them. This would be ok (but rough on users), except that we also removed the test that a pure git hash is an illegal version, which should have stayed. Change-Id: Idd8bc470fab1711d8555a793b1294b0977ba106d
-rw-r--r--pbr/tests/test_version.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbr/tests/test_version.py b/pbr/tests/test_version.py
index cd092a0..14c8d17 100644
--- a/pbr/tests/test_version.py
+++ b/pbr/tests/test_version.py
@@ -115,6 +115,9 @@ class TestSemanticVersion(base.BaseTestCase):
parsed = from_pip_string('2014.2.b2')
self.assertEqual(expected, parsed)
+ def test_from_pip_string_pure_git_hash(self):
+ self.assertRaises(ValueError, from_pip_string, '6eed5ae')
+
def test_from_pip_string_non_digit_start(self):
self.assertRaises(ValueError, from_pip_string,
'non-release-tag/2014.12.16-1')