From d10ab4cb1d1ca8090132f205017dfc90473c91cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Sun, 21 Feb 2016 18:54:02 +0100 Subject: Fix handling pre-1.0.0 caret versions (Closes #35) Thanks to @autopulated for pointing the issue! --- tests/test_base.py | 8 ++++++++ tests/test_match.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_base.py b/tests/test_base.py index 1fcce8c..24bf86e 100755 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -506,6 +506,14 @@ class SpecItemTestCase(unittest.TestCase): ['1.1.3', '1.2.1', '1.1.2-alpha', '1.1.2-alpha+b1'], ['1.1.1', '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.0.2': ( + ['0.0.2', '0.0.2-alpha', '0.0.2+abb'], + ['0.1.0', '0.0.3', '1.0.0'], + ), } def test_matches(self): diff --git a/tests/test_match.py b/tests/test_match.py index f0b0fe8..49464f8 100755 --- a/tests/test_match.py +++ b/tests/test_match.py @@ -106,7 +106,7 @@ class MatchTestCase(unittest.TestCase): '0.1.2', '0.1.2+build4.5', '0.1.3-rc1.3', - '0.2.0', + '0.1.4', ], '~0.1.2': [ '0.1.2', -- cgit v1.2.1