gh-97837: Change deprecation warning message in unittest (#97838)

This commit is contained in:
Nikita Sobolev 2022-10-05 03:29:18 +03:00 committed by GitHub
parent 4e731814d7
commit c3648f4e4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 8 deletions

View file

@ -88,7 +88,7 @@ class IsolatedAsyncioTestCase(TestCase):
def _callTestMethod(self, method):
if self._callMaybeAsync(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=4)
def _callTearDown(self):

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):