mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -19,6 +19,7 @@ RGX_REPR = re.compile(STR_RGX_REPR)
|
|||
class LockTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.loop = self.new_test_loop()
|
||||
|
||||
def test_ctor_loop(self):
|
||||
|
@ -235,6 +236,7 @@ class LockTests(test_utils.TestCase):
|
|||
class EventTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.loop = self.new_test_loop()
|
||||
|
||||
def test_ctor_loop(self):
|
||||
|
@ -364,6 +366,7 @@ class EventTests(test_utils.TestCase):
|
|||
class ConditionTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.loop = self.new_test_loop()
|
||||
|
||||
def test_ctor_loop(self):
|
||||
|
@ -699,6 +702,7 @@ class ConditionTests(test_utils.TestCase):
|
|||
class SemaphoreTests(test_utils.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.loop = self.new_test_loop()
|
||||
|
||||
def test_ctor_loop(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue