Skip to content

Test test_bpo_45813_2 in test_coroutines generates a "coroutine was never awaited" warning #100600

Description

@sobolevn

While playing around with #100582 and looking at build/test logs, I've noticed that there's this warning:

» ./python.exe -m test -v test_coroutines -m test_bpo_45813_2
== CPython 3.12.0a3+ (heads/issue-100577-dirty:43e3659e33, Dec 28 2022, 14:38:55) [Clang 11.0.0 (clang-1100.0.33.16)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== Python build: debug
== cwd: /Users/sobolev/Desktop/cpython/build/test_python_45783æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.32 Run tests sequentially
0:00:00 load avg: 1.32 [1/1] test_coroutines
test_bpo_45813_2 (test.test_coroutines.CoroutineTest.test_bpo_45813_2)
This would crash the interpreter in 3.11a2 ... /Users/sobolev/Desktop/cpython/Lib/test/test_coroutines.py:2217: RuntimeWarning: coroutine 'CoroutineTest.test_bpo_45813_2.<locals>.f' was never awaited
  if method() is not None:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
ok

I propose to fix it, there's no need for it. PR is incoming.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.11only security fixes3.12only security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions