mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Issue #28600: Optimize loop.call_soon().
Run expensive type checks only in debug mode. In addition, stop supporting passing handles to loop.run_in_executor.
This commit is contained in:
parent
9e80eeb22d
commit
491a912659
5 changed files with 29 additions and 57 deletions
|
|
@ -2249,13 +2249,6 @@ class HandleTests(test_utils.TestCase):
|
|||
h.cancel()
|
||||
self.assertTrue(h._cancelled)
|
||||
|
||||
def test_handle_from_handle(self):
|
||||
def callback(*args):
|
||||
return args
|
||||
h1 = asyncio.Handle(callback, (), loop=self.loop)
|
||||
self.assertRaises(
|
||||
AssertionError, asyncio.Handle, h1, (), self.loop)
|
||||
|
||||
def test_callback_with_exception(self):
|
||||
def callback():
|
||||
raise ValueError()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue