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
(cherry picked from commit 186f70905d)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-06-22 03:43:07 -07:00 committed by GitHub
parent 35202c7637
commit 9b32b44d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3352,7 +3352,9 @@ class CompatibilityTests(test_utils.TestCase):
asyncio.run(old_style_coro()) asyncio.run(old_style_coro())
""") """)
assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1")
assert_python_ok("-Wignore::DeprecationWarning", "-c", code,
PYTHONASYNCIODEBUG="1")
if __name__ == '__main__': if __name__ == '__main__':