Feature or enhancement
Right now there are two potential things we can improve in this warning message:
|
def _callTestMethod(self, method): |
|
if method() is not None: |
|
warnings.warn(f'It is deprecated to return a value that is not None from a ' |
|
f'test case ({method})', DeprecationWarning, stacklevel=3) |
|
|
- The returned value's type is not shown. It can be useful for users
- A common case for this warning is that
async def test_some is defined in a regular TestCase class, I think that we can improve this specific case and suggest to use IsolatedAsyncioTestCase instead
I have a patch ready.
Linked PRs
Feature or enhancement
Right now there are two potential things we can improve in this warning message:
cpython/Lib/unittest/case.py
Lines 605 to 609 in 19435d2
async def test_someis defined in a regularTestCaseclass, I think that we can improve this specific case and suggest to useIsolatedAsyncioTestCaseinsteadI have a patch ready.
Linked PRs