[3.11] gh-97837: Change deprecation warning message in unittest (GH-97838) (GH-97887)

(cherry picked from commit c3648f4e4a)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Automerge-Triggered-By: GH:orsenthil
This commit is contained in:
Miss Islington (bot) 2022-10-04 20:55:06 -07:00 committed by GitHub
parent 9133aabc70
commit 8c517d88fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 8 deletions

View file

@ -577,7 +577,7 @@ class TestCase(object):
def _callTestMethod(self, method):
if method() is not None:
warnings.warn(f'It is deprecated to return a value!=None from a '
warnings.warn(f'It is deprecated to return a value that is not None from a '
f'test case ({method})', DeprecationWarning, stacklevel=3)
def _callTearDown(self):