[issue41322] unittest: deprecate test methods returning non-None values

Andrei Kulakov report at bugs.python.org
Fri Aug 20 23:54:33 EDT 2021


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Yes, it seems like this deprecation detected a broken test that wasn't running.

If I add a `raise` statement to it and rerun the test, it still passes on my local system:
./python.exe -m unittest -v test.test_asyncio.test_events.PollEventLoopTests.test_subprocess_wait_no_same_group
  warnings.warn(f'It is deprecated to return a value!=None from a '
Ran 1 test in 0.022s

OK

(with last line of test being just `raise`).

It seems to me it should be fixed in some way although I don't know if Ryan's suggestion will do or not as I haven't looked at asyncio tests before..

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41322>
_______________________________________


More information about the Python-bugs-list mailing list