summaryrefslogtreecommitdiff
path: root/tests/test_npm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_npm.py')
-rw-r--r--tests/test_npm.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_npm.py b/tests/test_npm.py
index 86cbc76..7bed337 100644
--- a/tests/test_npm.py
+++ b/tests/test_npm.py
@@ -6,11 +6,18 @@
"""Test NPM-style specifications."""
import unittest
+import sys
from semantic_version import base
class NpmSpecTests(unittest.TestCase):
+ if sys.version_info[0] <= 2:
+ import contextlib
+ @contextlib.contextmanager
+ def subTest(self, **kwargs):
+ yield
+
examples = {
# range: [matchings], [failings]
'>=1.2.7': (