diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-07-17 21:18:54 +0100 |
---|---|---|
committer | da-woods <dw-git@d-woods.co.uk> | 2022-07-17 21:18:54 +0100 |
commit | 34b72dc6fc511c900d0e27c415550fd625c4d724 (patch) | |
tree | 62e2847a7e55fefbd3bdf3d447a5da0db95e95c5 | |
parent | 771051ab77593b507b91e8041da0c293a5e9dd13 (diff) | |
download | cython-34b72dc6fc511c900d0e27c415550fd625c4d724.tar.gz |
Substitute subtest of Python 2.7
-rw-r--r-- | tests/run/test_patma.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/test_patma.py b/tests/run/test_patma.py index 240dbf0d3..61ac6957f 100644 --- a/tests/run/test_patma.py +++ b/tests/run/test_patma.py @@ -59,6 +59,16 @@ else: # except for one test that seems misplaced in CPython (which is below) class TestTracing(unittest.TestCase): + if sys.version_info < (3, 4): + class SubTestClass(object): + def __enter__(self): + return self + def __exit__(self, exc_type, exc_value, traceback): + return + def __call__(self, *args): + return self + subTest = SubTestClass() + def test_parser_deeply_nested_patterns(self): # Deeply nested patterns can cause exponential backtracking when parsing. # See CPython gh-93671 for more information. |