mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #28613: Fix get_event_loop() to return the current loop
when called from coroutines or callbacks.
This commit is contained in:
parent
1ea023e523
commit
600a349781
18 changed files with 126 additions and 2 deletions
|
@ -24,6 +24,7 @@ def close_transport(transport):
|
|||
class ProactorSocketTransportTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.loop = self.new_test_loop()
|
||||
self.addCleanup(self.loop.close)
|
||||
self.proactor = mock.Mock()
|
||||
|
@ -436,6 +437,8 @@ class ProactorSocketTransportTests(test_utils.TestCase):
|
|||
class BaseProactorEventLoopTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
self.sock = test_utils.mock_nonblocking_socket()
|
||||
self.proactor = mock.Mock()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue