[3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)
https://github.com/python/cpython/commit/446c81c3c3a5e82c1df475b8a98009aeb5b... commit: 446c81c3c3a5e82c1df475b8a98009aeb5b5433e branch: 3.11 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: vstinner <vstinner@python.org> date: 2023-09-30T21:01:33Z summary: [3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159) gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) Don't measure the CI performance: don't test the maximum elapsed time. The check failed on a slow CI. (cherry picked from commit c62b49ecc8da13fa9522865ef6fe0aec194fd0d8) Co-authored-by: Victor Stinner <vstinner@python.org> files: M Lib/test/test_asyncio/test_events.py diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index daf2fb87994a8..d7871d3e538cb 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -1671,12 +1671,9 @@ async def main(): self.loop.stop() return res - start = time.monotonic() t = self.loop.create_task(main()) self.loop.run_forever() - elapsed = time.monotonic() - start - self.assertLess(elapsed, 0.1) self.assertEqual(t.result(), 'cancelled') self.assertRaises(asyncio.CancelledError, f.result) if ov is not None:
participants (1)
-
vstinner