mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
bpo-45162: Remove many old deprecated unittest features (GH-28268)
* "fail*" and "assert*" aliases of TestCase methods. * Broken from start TestCase method assertDictContainsSubset(). * Ignored TestLoader.loadTestsFromModule() parameter use_load_tests. * Old alias _TextTestResult of TextTestResult.
This commit is contained in:
parent
0361335b80
commit
b0a6ede3d0
14 changed files with 61 additions and 373 deletions
|
@ -189,15 +189,6 @@ class TextTestRunner(object):
|
|||
if self.warnings:
|
||||
# if self.warnings is set, use it to filter all the warnings
|
||||
warnings.simplefilter(self.warnings)
|
||||
# if the filter is 'default' or 'always', special-case the
|
||||
# warnings from the deprecated unittest methods to show them
|
||||
# no more than once per module, because they can be fairly
|
||||
# noisy. The -Wd and -Wa flags can be used to bypass this
|
||||
# only when self.warnings is None.
|
||||
if self.warnings in ['default', 'always']:
|
||||
warnings.filterwarnings('module',
|
||||
category=DeprecationWarning,
|
||||
message=r'Please use assert\w+ instead.')
|
||||
startTime = time.perf_counter()
|
||||
startTestRun = getattr(result, 'startTestRun', None)
|
||||
if startTestRun is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue