diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-17 03:03:42 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-17 14:53:53 +0200 |
commit | c115317598a022b1ee999c7f0cbe888ab9b25a4e (patch) | |
tree | 76cf5638518824a049933ebdacbc56902c500df6 /tests | |
parent | 305b0b8b676cc13315a1d8ce40680db23d889a21 (diff) | |
download | semantic-version-c115317598a022b1ee999c7f0cbe888ab9b25a4e.tar.gz |
Improve support for loose matches.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_match.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/test_match.py b/tests/test_match.py index 9d05c7c..2e88c60 100755 --- a/tests/test_match.py +++ b/tests/test_match.py @@ -17,7 +17,7 @@ class MatchTestCase(unittest.TestCase): ] valid_specs = [ - '~0.1', + '~=0.1', '<=0.1.1', '>0.1.2-rc1', '>=0.1.2-rc1.3.4', @@ -26,14 +26,14 @@ class MatchTestCase(unittest.TestCase): ] matches = { - '~0.1': [ + '~=0.1': [ '0.1.1', '0.1.2-rc1', '0.1.2-rc1.3.4', '0.1.2+build42-12.2012-01-01.12h23', '0.1.2-rc1.3-14.15+build.2012-01-01.11h34', ], - '~0.1.2': [ + '~=0.1.2': [ '0.1.2-rc1', '0.1.2-rc1.3.4', '0.1.2+build42-12.2012-01-01.12h23', @@ -64,6 +64,17 @@ class MatchTestCase(unittest.TestCase): '0.2.0', '1.0.0', ], + '>~0.1': [ + '0.1.1', + '0.1.0-rc1', + '1.1.1', + '2.0.4', + ], + '<~0.1.1': [ + '0.1.1', + '0.1.1-rc4', + '0.1.0+12.3', + ], } def test_invalid(self): |