File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,12 @@ def test_LooseVersion(self):
155155 self .assertFalse (version_4beta .is_prerelease ('4.0.0' , ['rc' ]))
156156 self .assertFalse (version_4beta .is_prerelease ('4.0.0' , ['rc, -beta' ]))
157157
158+ # behaviour when one version is prefixed with e.g. 'v' is perhaps unintuitive -
159+ # leading alphabetical characters are always "greater" than numerals
160+ self .assertLess (LooseVersion ('1000' ), LooseVersion ('v1.0' ))
161+ self .assertGreater (LooseVersion ('v2.0' ), LooseVersion ('v1.0' ))
162+ self .assertGreater (LooseVersion ('w0.1' ), LooseVersion ('v1.0' ))
163+
158164 # The following test is based on the Python distutils tests
159165 # licensed under the Python Software Foundation License Version 2
160166 versions = (('1.5.1' , '1.5.2b2' , - 1 ),
You can’t perform that action at this time.
0 commit comments