Skip to content

Commit

Permalink
[3.12] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#…
Browse files Browse the repository at this point in the history
…110158)

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 c62b49e)

Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
miss-islington and vstinner committed Oct 2, 2023
1 parent b8a30a4 commit ce332aa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Lib/test/test_asyncio/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1693,12 +1693,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:
Expand Down

0 comments on commit ce332aa

Please sign in to comment.