summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2012-05-17 03:03:42 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2012-05-17 14:53:53 +0200
commitc115317598a022b1ee999c7f0cbe888ab9b25a4e (patch)
tree76cf5638518824a049933ebdacbc56902c500df6 /tests
parent305b0b8b676cc13315a1d8ce40680db23d889a21 (diff)
downloadsemantic-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-xtests/test_match.py17
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):