Make version_from_string() more tolerant

This commit is contained in:
Laurent Monin
2014-01-02 11:50:51 +01:00
parent 69f59348c1
commit 81ec25afcd
2 changed files with 5 additions and 1 deletions

View File

@@ -54,3 +54,7 @@ class VersionsTest(unittest.TestCase):
def test_version_conv_11(self):
l, s = ('1', '1', '0', 'dev', '0'), '1.1.0dev0'
self.assertEqual(version_to_string(l), s)
def test_version_conv_12(self):
l, s = (1, 1, 0, 'dev', 0), '1_1_0_dev_0'
self.assertEqual(l, version_from_string(s))