diff options
author | Martin Ek <mail@ekmartin.com> | 2016-02-23 23:24:32 +0100 |
---|---|---|
committer | Martin Ek <mail@ekmartin.com> | 2016-02-25 22:48:00 +0100 |
commit | 0c96767bd36ea082620f444ff5f3410025a9e99f (patch) | |
tree | 46af9014fa12b8edb817501bdb618c2e326c73c5 /tests | |
parent | d10ab4cb1d1ca8090132f205017dfc90473c91cc (diff) | |
download | semantic-version-0c96767bd36ea082620f444ff5f3410025a9e99f.tar.gz |
Add support for compatible release ranges, fixes #37
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_base.py | 8 | ||||
-rwxr-xr-x | tests/test_match.py | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index 24bf86e..0675b24 100755 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -514,6 +514,14 @@ class SpecItemTestCase(unittest.TestCase): ['0.0.2', '0.0.2-alpha', '0.0.2+abb'], ['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.4': ( + ['1.4.0', '1.6.10-alpha', '1.6.10'], + ['1.3.0', '2.0.0'], + ), } def test_matches(self): diff --git a/tests/test_match.py b/tests/test_match.py index 49464f8..4d1a96f 100755 --- a/tests/test_match.py +++ b/tests/test_match.py @@ -31,6 +31,7 @@ class MatchTestCase(unittest.TestCase): '!=0.1.2-rc1.3-14.15+build.2012-01-01.11h34', '^0.1.2', '~0.1.2', + '~=0.1.2', ] matches = { @@ -113,6 +114,16 @@ class MatchTestCase(unittest.TestCase): '0.1.2+build4.5', '0.1.3-rc1.3', ], + '~=1.4.5': ( + '1.4.5', + '1.4.10-alpha', + '1.4.10', + ), + '~=1.4': [ + '1.4.0', + '1.6.10-alpha', + '1.6.10', + ], } def test_invalid(self): |