]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 30 Sep 2023 21:01:33 +0000 (14:01 -0700)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2023 21:01:33 +0000 (21:01 +0000)
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>
Lib/test/test_asyncio/test_events.py

index daf2fb87994a842dc519ccc7b166b245491c8aa7..d7871d3e538cbaab83e1e9edd0d0344f74201734 100644 (file)
@@ -1671,12 +1671,9 @@ class EventLoopTestsMixin:
                 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: