Issue #28613: Fix get_event_loop() to return the current loop

when called from coroutines or callbacks.
This commit is contained in:
Yury Selivanov 2016-11-04 14:29:28 -04:00
parent 1ea023e523
commit 600a349781
18 changed files with 126 additions and 2 deletions

View file

@ -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):