diff options
Diffstat (limited to 'tests/test_base.py')
-rwxr-xr-x | tests/test_base.py | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index 76d120b..d5794b3 100755 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -83,7 +83,7 @@ class TopLevelTestCase(unittest.TestCase): matches = ( ('>=0.1.1', '0.1.2'), ('>=0.1.1', '0.1.1'), - ('>=0.1.1', '0.1.1-alpha'), + ('>=0.1.1', '0.1.2-alpha'), ('>=0.1.1,!=0.2.0', '0.2.1'), ) @@ -463,16 +463,16 @@ class SpecItemTestCase(unittest.TestCase): matches = { '==0.1.0': ( - ['0.1.0', '0.1.0-rc1', '0.1.0+build1', '0.1.0-rc1+build2'], - ['0.0.1', '0.2.0', '0.1.1'], + ['0.1.0', '0.1.0+build1'], + ['0.0.1', '0.1.0-rc1', '0.2.0', '0.1.1', '0.1.0-rc1+build2'], ), '=0.1.0': ( - ['0.1.0', '0.1.0-rc1', '0.1.0+build1', '0.1.0-rc1+build2'], - ['0.0.1', '0.2.0', '0.1.1'], + ['0.1.0', '0.1.0+build1'], + ['0.0.1', '0.1.0-rc1', '0.2.0', '0.1.1', '0.1.0-rc1+build2'], ), '0.1.0': ( - ['0.1.0', '0.1.0-rc1', '0.1.0+build1', '0.1.0-rc1+build2'], - ['0.0.1', '0.2.0', '0.1.1'], + ['0.1.0', '0.1.0+build1'], + ['0.0.1', '0.1.0-rc1', '0.2.0', '0.1.1', '0.1.0-rc1+build2'], ), '==0.1.2-rc3': ( ['0.1.2-rc3+build1', '0.1.2-rc3+build4.5'], @@ -502,6 +502,10 @@ class SpecItemTestCase(unittest.TestCase): ['0.2.3-rc3', '0.2.3', '0.2.3+1', '0.2.3-rc2', '0.2.3-rc2+1'], ['0.2.3-rc1', '0.2.2'], ), + '>=0.2.3': ( + ['0.2.3', '0.2.3+1'], + ['0.2.3-rc3', '0.2.3-rc2', '0.2.3-rc2+1', '0.2.3-rc1', '0.2.2'], + ), '==0.2.3+': ( ['0.2.3'], ['0.2.3+rc1', '0.2.4', '0.2.3-rc2'], @@ -523,32 +527,32 @@ class SpecItemTestCase(unittest.TestCase): ['0.3.4', '0.3.4+b1'], ), '~1.1.2': ( - ['1.1.3', '1.1.2-alpha', '1.1.2-alpha+b1'], - ['1.1.1', '1.2.1', '2.1.0'], + ['1.1.3', '1.1.2+b1'], + ['1.1.1', '1.1.2-alpha', '1.1.2-alpha+b1', '1.2.1', '2.1.0'], ), '^1.1.2': ( - ['1.1.3', '1.2.1', '1.1.2-alpha', '1.1.2-alpha+b1'], - ['1.1.1', '2.1.0'], + ['1.1.3', '1.1.2+b1', '1.2.1'], + ['1.1.1', '1.1.2-alpha', '1.1.2-alpha+b1', '2.1.0'], ), '^0.1.2': ( - ['0.1.2', '0.1.2-alpha', '0.1.3'], - ['0.2.0', '1.1.2', '0.1.1'], + ['0.1.2', '0.1.2+b1', '0.1.3'], + ['0.1.2-alpha', '0.2.0', '1.1.2', '0.1.1'], ), '^0.0.2': ( - ['0.0.2', '0.0.2-alpha', '0.0.2+abb'], - ['0.1.0', '0.0.3', '1.0.0'], + ['0.0.2', '0.0.2+abb'], + ['0.0.2-alpha', '0.1.0', '0.0.3', '1.0.0'], ), '~=1.4.5': ( ['1.4.5', '1.4.10-alpha', '1.4.10'], - ['1.3.6', '1.4.4', '1.5.0'], + ['1.3.6', '1.4.4', '1.4.5-alpha', '1.5.0'], ), '~=1.4.0': ( ['1.4.0', '1.4.10-alpha', '1.4.10'], - ['1.3.6', '1.3.9', '1.5.0'], + ['1.3.6', '1.3.9', '1.4.0-alpha', '1.5.0'], ), '~=1.4': ( ['1.4.0', '1.6.10-alpha', '1.6.10'], - ['1.3.0', '2.0.0'], + ['1.3.0', '1.4.0-alpha', '2.0.0'], ), } @@ -646,12 +650,12 @@ class SpecTestCase(unittest.TestCase): self.assertIn(str(base.SpecItem(spec_text)), repr(spec_list)) matches = { - # At least 0.1.1 including pre-releases, less than 0.1.2 excluding pre-releases + # At least 0.1.1 excluding pre-releases, less than 0.1.2 excluding pre-releases '>=0.1.1,<0.1.2': ( - ['0.1.1', '0.1.1+4', '0.1.1-alpha'], - ['0.1.2-alpha', '0.1.2', '1.3.4'], + ['0.1.1', '0.1.1+4'], + ['0.1.1-alpha', '0.1.2-alpha', '0.1.2', '1.3.4'], ), - # At least 0.1.0 without pre-releases, less than 0.1.4 excluding pre-releases, + # At least 0.1.0 with pre-releases, less than 0.1.4 excluding pre-releases, # neither 0.1.3-rc1 nor any build of that version, # not 0.1.0+b3 precisely '>=0.1.0-,!=0.1.3-rc1,!=0.1.0+b3,<0.1.4': ( |