]> granicus.if.org Git - python/commit
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)
authorVictor Stinner <vstinner@redhat.com>
Fri, 14 Jun 2019 11:02:51 +0000 (13:02 +0200)
committerGitHub <noreply@github.com>
Fri, 14 Jun 2019 11:02:51 +0000 (13:02 +0200)
commit07559450b2d9179e4c99e0af088ce7550e549f94
treef0e6cb7c58179b73b43fa984a83b3f51232345c7
parentb2f94730d947f25b8507c5f76202e917683e76f7
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)

Join the thread to prevent leaking a running thread and leaking a
reference.

Cleanup also the test:

* asyncioWindowsProactorEventLoopPolicy became the default policy,
  there is no need to set it manually.
* Only start the thread once the loop is running.
* Use a shorter sleep in the thread (100 ms rather than 1 sec).
* Use close_loop(loop) rather than loop.close().
* Use longer variable names.
Lib/test/test_asyncio/test_windows_events.py
Misc/NEWS.d/next/Tests/2019-06-14-12-21-47.bpo-37278.z0HUOr.rst [new file with mode: 0644]