diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-06-22 10:25:26 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-22 10:25:25 (GMT) |
commit | 186f70905d07b42a9cbf0a29e448f30baf2b53cb (patch) | |
tree | c28d431ada1115e4be52ac38bc0f5702f0a62bd1 | |
parent | 184f3d4f39056f6fe450d007d3b9b61d811a2a4d (diff) | |
download | cpython-186f70905d07b42a9cbf0a29e448f30baf2b53cb.zip cpython-186f70905d07b42a9cbf0a29e448f30baf2b53cb.tar.gz cpython-186f70905d07b42a9cbf0a29e448f30baf2b53cb.tar.bz2 |
bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)
When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`.
https://bugs.python.org/issue37323
-rw-r--r-- | Lib/test/test_asyncio/test_tasks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index 22a4907..d5f44b8 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -3352,7 +3352,9 @@ class CompatibilityTests(test_utils.TestCase): asyncio.run(old_style_coro()) """) - assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1") + + assert_python_ok("-Wignore::DeprecationWarning", "-c", code, + PYTHONASYNCIODEBUG="1") if __name__ == '__main__': |