summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_version.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging/tests/test_version.py')
-rw-r--r--Lib/packaging/tests/test_version.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_version.py b/Lib/packaging/tests/test_version.py
index c863362..2d178bf 100644
--- a/Lib/packaging/tests/test_version.py
+++ b/Lib/packaging/tests/test_version.py
@@ -16,6 +16,7 @@ class VersionTestCase(unittest.TestCase):
(V('1.2'), '1.2'),
(V('1.2.3a4'), '1.2.3a4'),
(V('1.2c4'), '1.2c4'),
+ (V('4.17rc2'), '4.17rc2'),
(V('1.2.3.4'), '1.2.3.4'),
(V('1.2.3.4.0b3'), '1.2.3.4b3'),
(V('1.2.0.0.0'), '1.2'),
@@ -146,6 +147,14 @@ class VersionTestCase(unittest.TestCase):
"""
doctest.script_from_examples(comparison_doctest_string)
+ # the doctest above is never run, so temporarily add real unit
+ # tests until the doctest is rewritten
+ self.assertLessEqual(V('1.2.0rc1'), V('1.2.0'))
+ self.assertGreater(V('1.0'), V('1.0c2'))
+ self.assertGreater(V('1.0'), V('1.0rc2'))
+ self.assertGreater(V('1.0rc2'), V('1.0rc1'))
+ self.assertGreater(V('1.0c4'), V('1.0c1'))
+
def test_suggest_normalized_version(self):
self.assertEqual(suggest('1.0'), '1.0')