summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/src
diff options
context:
space:
mode:
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 3f19d296979..9befb36f33a 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.