mirror of
https://github.com/python/cpython.git
synced 2025-10-01 04:42:10 +00:00
[3.12] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#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 c62b49ecc8
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
b8a30a4365
commit
ce332aa8c5
1 changed files with 0 additions and 3 deletions
|
@ -1693,12 +1693,9 @@ class EventLoopTestsMixin:
|
||||||
self.loop.stop()
|
self.loop.stop()
|
||||||
return res
|
return res
|
||||||
|
|
||||||
start = time.monotonic()
|
|
||||||
t = self.loop.create_task(main())
|
t = self.loop.create_task(main())
|
||||||
self.loop.run_forever()
|
self.loop.run_forever()
|
||||||
elapsed = time.monotonic() - start
|
|
||||||
|
|
||||||
self.assertLess(elapsed, 0.1)
|
|
||||||
self.assertEqual(t.result(), 'cancelled')
|
self.assertEqual(t.result(), 'cancelled')
|
||||||
self.assertRaises(asyncio.CancelledError, f.result)
|
self.assertRaises(asyncio.CancelledError, f.result)
|
||||||
if ov is not None:
|
if ov is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue