diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-09-06 13:06:57 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-09-06 13:06:57 +0200 |
commit | f029601524ab56205990aa0a69621a89de04c43a (patch) | |
tree | 18fe8c4244440ef8ce1c8a693a4aae4eb65415a6 /tests | |
parent | 17949b82ac9a1173566c08bab4b254e9d64a7ce1 (diff) | |
download | semantic-version-f029601524ab56205990aa0a69621a89de04c43a.tar.gz |
Fix Spec.specs for single-term ranges.maint/2.x
This (deprecated) property failed when used on a `Spec` item based on a
single-term range (e.g. `==0.1.2` `<2.0.0`).
Closes #82.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_base.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index cd0b5f5..2c0830f 100755 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -606,6 +606,10 @@ class SpecTestCase(unittest.TestCase): examples = { '>=0.1.1,<0.1.2': ['>=0.1.1', '<0.1.2'], '>=0.1.0,!=0.1.3-rc1,<0.1.3': ['>=0.1.0', '!=0.1.3-rc1', '<0.1.3'], + '=0.1.2': ['==0.1.2'], + '>=0.1.2': ['>=0.1.2'], + '^1.2.3': ['>=1.2.3', '<2.0.0'], + '~=1.2.3': ['>=1.2.3', '<1.3.0'], } def test_parsing(self): @@ -617,9 +621,6 @@ class SpecTestCase(unittest.TestCase): self.assertNotEqual(spec_list_text, spec_list) self.assertCountEqual(specs, [str(spec) for spec in spec_list]) - for spec_text in specs: - self.assertIn(str(base.SpecItem(spec_text)), repr(spec_list)) - split_examples = { ('>=0.1.1', '<0.1.2', '!=0.1.1+build1'): ['>=0.1.1', '<0.1.2', '!=0.1.1+build1'], ('>=0.1.0', '!=0.1.3-rc1,<0.1.3'): ['>=0.1.0', '!=0.1.3-rc1', '<0.1.3'], |