Skip to content

Commit

Permalink
pythongh-110088: Fix asyncio test_prompt_cancellation() (pythonGH-110157
Browse files Browse the repository at this point in the history
)

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
vstinner authored and miss-islington committed Sep 30, 2023
1 parent 080f5b9 commit 39d2f9c
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 @@ -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:
Expand Down

0 comments on commit 39d2f9c

Please sign in to comment.