cpython: 2105ab8553b7 (original) (raw)
Mercurial > cpython
changeset 72731:2105ab8553b7
Add tests for comparing candidate and final versions in packaging (#11841). This used to be buggy; Filip Gruszczyński contributed tests and a code patch but the latter is not needed. [#11841]
Éric Araujo merwok@netwok.org | |
---|---|
date | Wed, 05 Oct 2011 01:41:14 +0200 |
parents | 285950ceee8a |
children | c17b91e08b60 |
files | Lib/packaging/tests/test_version.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-)[+] [-] Lib/packaging/tests/test_version.py 12 |
line wrap: on
line diff
--- a/Lib/packaging/tests/test_version.py +++ b/Lib/packaging/tests/test_version.py @@ -101,8 +101,18 @@ class VersionTestCase(unittest.TestCase) True >>> V('1.2.0') >= V('1.2.3') False
>>> V('1.2.0rc1') >= V('1.2.0')[](#l1.7)
False[](#l1.8) >>> (V('1.0') > V('1.0b2'))[](#l1.9) True[](#l1.10)
>>> V('1.0') > V('1.0c2')[](#l1.11)
True[](#l1.12)
>>> V('1.0') > V('1.0rc2')[](#l1.13)
True[](#l1.14)
>>> V('1.0rc2') > V('1.0rc1')[](#l1.15)
True[](#l1.16)
>>> V('1.0c4') > V('1.0c1')[](#l1.17)
True[](#l1.18) >>> (V('1.0') > V('1.0c2') > V('1.0c1') > V('1.0b2') > V('1.0b1')[](#l1.19) ... > V('1.0a2') > V('1.0a1'))[](#l1.20) True[](#l1.21)
@@ -129,6 +139,8 @@ class VersionTestCase(unittest.TestCase) ... < V('1.0.dev18') ... < V('1.0.dev456') ... < V('1.0.dev1234')
... < V('1.0rc1')[](#l1.26)
... < V('1.0rc2')[](#l1.27) ... < V('1.0')[](#l1.28) ... < V('1.0.post456.dev623') # development version of a post release[](#l1.29) ... < V('1.0.post456'))[](#l1.30)