mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21449)
This commit is contained in:
parent
488512bf49
commit
a7f5d93bb6
20 changed files with 154 additions and 132 deletions
|
@ -2,7 +2,7 @@ import io
|
|||
import sys
|
||||
import textwrap
|
||||
|
||||
from test import support
|
||||
from test.support import warnings_helper
|
||||
|
||||
import traceback
|
||||
import unittest
|
||||
|
@ -458,8 +458,8 @@ OldResult = type('OldResult', (object,), classDict)
|
|||
class Test_OldTestResult(unittest.TestCase):
|
||||
|
||||
def assertOldResultWarning(self, test, failures):
|
||||
with support.check_warnings(("TestResult has no add.+ method,",
|
||||
RuntimeWarning)):
|
||||
with warnings_helper.check_warnings(
|
||||
("TestResult has no add.+ method,", RuntimeWarning)):
|
||||
result = OldResult()
|
||||
test.run(result)
|
||||
self.assertEqual(len(result.failures), failures)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue