We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e6079e commit 039d19fCopy full SHA for 039d19f
1 file changed
test/framework/utilities_test.py
@@ -155,6 +155,12 @@ def test_LooseVersion(self):
155
self.assertFalse(version_4beta.is_prerelease('4.0.0', ['rc']))
156
self.assertFalse(version_4beta.is_prerelease('4.0.0', ['rc, -beta']))
157
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
+
164
# The following test is based on the Python distutils tests
165
# licensed under the Python Software Foundation License Version 2
166
versions = (('1.5.1', '1.5.2b2', -1),
0 commit comments