mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-41322: added deprecation warning for tests returning value!=None (GH-27748)
This commit is contained in:
parent
0fd66e46b2
commit
3db42fc5ac
3 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
import asyncio
|
||||
import inspect
|
||||
import warnings
|
||||
|
||||
from .case import TestCase
|
||||
|
||||
|
@ -62,7 +63,9 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
self._callAsync(self.asyncSetUp)
|
||||
|
||||
def _callTestMethod(self, method):
|
||||
self._callMaybeAsync(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)
|
||||
|
||||
def _callTearDown(self):
|
||||
self._callAsync(self.asyncTearDown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue