diff options
author | andrei kulakov <andrei.avk@gmail.com> | 2021-08-22 18:32:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 18:32:45 (GMT) |
commit | b1db308c6114bb18c06656c94c0ffa73ba954977 (patch) | |
tree | c69da403a5693c670028754c8a8d3af69e9e24b6 /Lib/unittest/async_case.py | |
parent | 6dd1cdb0cfd6427925863e0ff7ad3fde0d824a8b (diff) | |
download | cpython-b1db308c6114bb18c06656c94c0ffa73ba954977.zip cpython-b1db308c6114bb18c06656c94c0ffa73ba954977.tar.gz cpython-b1db308c6114bb18c06656c94c0ffa73ba954977.tar.bz2 |
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
Also fix the traceback of warnings.
Diffstat (limited to 'Lib/unittest/async_case.py')
-rw-r--r-- | Lib/unittest/async_case.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/async_case.py b/Lib/unittest/async_case.py index cc404cc..bfc68a7 100644 --- a/Lib/unittest/async_case.py +++ b/Lib/unittest/async_case.py @@ -65,7 +65,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 ' - f'test case ({method})', DeprecationWarning) + f'test case ({method})', DeprecationWarning, stacklevel=4) def _callTearDown(self): self._callAsync(self.asyncTearDown) |