mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
asyncio, Tulip issue 126: call_soon(), call_soon_threadsafe(), call_later(),
call_at() and run_in_executor() now raise a TypeError if the callback is a coroutine function.
This commit is contained in:
parent
1db2ba3a92
commit
a125497ea3
6 changed files with 39 additions and 13 deletions
|
@ -402,7 +402,7 @@ class BaseProactorEventLoopTests(unittest.TestCase):
|
|||
NotImplementedError, BaseProactorEventLoop, self.proactor)
|
||||
|
||||
def test_make_socket_transport(self):
|
||||
tr = self.loop._make_socket_transport(self.sock, unittest.mock.Mock())
|
||||
tr = self.loop._make_socket_transport(self.sock, asyncio.Protocol())
|
||||
self.assertIsInstance(tr, _ProactorSocketTransport)
|
||||
|
||||
def test_loop_self_reading(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue