sobolevn · GitHub

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)
  1. The returned value's type is not shown. It can be useful for users
  2. 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

Read the original on github.com ↗