Skip to content

Commit 186f709

Browse files
tirkarthimiss-islington
authored andcommitted
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
1 parent 184f3d4 commit 186f709

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_asyncio/test_tasks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3352,7 +3352,9 @@ def old_style_coro():
33523352
33533353
asyncio.run(old_style_coro())
33543354
""")
3355-
assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1")
3355+
3356+
assert_python_ok("-Wignore::DeprecationWarning", "-c", code,
3357+
PYTHONASYNCIODEBUG="1")
33563358

33573359

33583360
if __name__ == '__main__':

0 commit comments

Comments
 (0)