diff options
| author | ?ric Araujo <merwok@netwok.org> | 2012-02-27 11:57:12 +0100 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2012-02-27 11:57:12 +0100 |
| commit | d44c91095d18d49af41cfd35eec3dc1dfc39b36d (patch) | |
| tree | d13497f90bd4e1ce70a058c42e1a0c60c620687c /distutils2/tests | |
| parent | b702a4339ded47af4c796c9231b169dd346fc907 (diff) | |
| download | disutils2-d44c91095d18d49af41cfd35eec3dc1dfc39b36d.tar.gz | |
Fix comparison bug with 'rc' versions (#11841)
Diffstat (limited to 'distutils2/tests')
| -rw-r--r-- | distutils2/tests/test_version.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/distutils2/tests/test_version.py b/distutils2/tests/test_version.py index ab4ab58..00b38d2 100644 --- a/distutils2/tests/test_version.py +++ b/distutils2/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') |
