mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
Also fix the traceback of warnings.
This commit is contained in:
parent
6dd1cdb0cf
commit
b1db308c61
6 changed files with 50 additions and 2 deletions
|
@ -548,7 +548,7 @@ class TestCase(object):
|
|||
def _callTestMethod(self, method):
|
||||
if method() is not None:
|
||||
warnings.warn(f'It is deprecated to return a value!=None from a '
|
||||
f'test case ({method})', DeprecationWarning)
|
||||
f'test case ({method})', DeprecationWarning, stacklevel=3)
|
||||
|
||||
def _callTearDown(self):
|
||||
self.tearDown()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue