From e1ea37642d0fd9bffb865da4122706e7349afec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 29 Aug 2019 11:31:57 +0200 Subject: Restore Python2 support. --- tests/test_match.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_match.py') 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', -- cgit v1.2.1