mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -65,7 +65,7 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
def _callTestMethod(self, method):
|
||||
if self._callMaybeAsync(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=4)
|
||||
|
||||
def _callTearDown(self):
|
||||
self._callAsync(self.asyncTearDown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue