summaryrefslogtreecommitdiff
path: root/tests/test_match.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-29 11:31:57 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-29 11:38:14 +0200
commite1ea37642d0fd9bffb865da4122706e7349afec1 (patch)
tree4a18c2f26f95333dc9e6c7016e2eb44b174599b5 /tests/test_match.py
parent1655f9cdd72dd3e6dcaf071e84aa5e897e06d39d (diff)
downloadsemantic-version-e1ea37642d0fd9bffb865da4122706e7349afec1.tar.gz
Restore Python2 support.rbarrois/restore-py2
Diffstat (limited to 'tests/test_match.py')
-rwxr-xr-xtests/test_match.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_match.py b/tests/test_match.py
index 4bf7162..f807828 100755
--- a/tests/test_match.py
+++ b/tests/test_match.py
@@ -4,11 +4,18 @@
# This code is distributed under the two-clause BSD License.
import unittest
+import sys
import semantic_version
class MatchTestCase(unittest.TestCase):
+ if sys.version_info[0] <= 2:
+ import contextlib
+ @contextlib.contextmanager
+ def subTest(self, **kwargs):
+ yield
+
invalid_specs = [
'',
'!0.1',