aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/src
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-22 17:10:22 +0100
committerGitHub <noreply@github.com>2023-12-22 17:10:22 +0100
commit148f920350c60c0ca2d89b637a5aea9093eee450 (patch)
tree6314b1433dac833398c333731e83f0ad77e81a0b /contrib/tools/python/src
parent7116d46ae7c0259b5f9d489de263f8701e432b1c (diff)
downloadydb-148f920350c60c0ca2d89b637a5aea9093eee450.tar.gz
Library import 2 (#639)
Diffstat (limited to 'contrib/tools/python/src')
-rw-r--r--contrib/tools/python/src/Lib/unittest/case.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/tools/python/src/Lib/unittest/case.py b/contrib/tools/python/src/Lib/unittest/case.py
index 3f19d29697..9befb36f33 100644
--- a/contrib/tools/python/src/Lib/unittest/case.py
+++ b/contrib/tools/python/src/Lib/unittest/case.py
@@ -993,9 +993,6 @@ class TestCase(object):
with context:
callable_obj(*args, **kwargs)
- # XXX Для более простой миграции существующих тестов на Python 3
- assertRaisesRegex = assertRaisesRegexp
-
def assertRegexpMatches(self, text, expected_regexp, msg=None):
"""Fail the test unless the text matches the regular expression."""
if isinstance(expected_regexp, basestring):
@@ -1018,6 +1015,11 @@ class TestCase(object):
text)
raise self.failureException(msg)
+ # XXX Для более простой миграции существующих тестов на Python 3
+ assertRaisesRegex = assertRaisesRegexp
+ assertRegex = assertRegexpMatches
+
+
class FunctionTestCase(TestCase):
"""A test case that wraps a test function.