diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-04 18:29:28 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-04 18:29:28 (GMT) |
commit | 600a349781bfa0a8239e1cb95fac29c7c4a3302e (patch) | |
tree | 79f35114de7101a97fe85f80cd02cbd866d4abd9 /Lib/test/test_asyncio/test_unix_events.py | |
parent | 1ea023e523f484955fb81b59a72c586845d8d97f (diff) | |
download | cpython-600a349781bfa0a8239e1cb95fac29c7c4a3302e.zip cpython-600a349781bfa0a8239e1cb95fac29c7c4a3302e.tar.gz cpython-600a349781bfa0a8239e1cb95fac29c7c4a3302e.tar.bz2 |
Issue #28613: Fix get_event_loop() to return the current loop
when called from coroutines or callbacks.
Diffstat (limited to 'Lib/test/test_asyncio/test_unix_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_unix_events.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index ce897ed..83a035e 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -40,6 +40,7 @@ def close_pipe_transport(transport): class SelectorEventLoopSignalTests(test_utils.TestCase): def setUp(self): + super().setUp() self.loop = asyncio.SelectorEventLoop() self.set_event_loop(self.loop) @@ -234,6 +235,7 @@ class SelectorEventLoopSignalTests(test_utils.TestCase): class SelectorEventLoopUnixSocketTests(test_utils.TestCase): def setUp(self): + super().setUp() self.loop = asyncio.SelectorEventLoop() self.set_event_loop(self.loop) @@ -338,6 +340,7 @@ class SelectorEventLoopUnixSocketTests(test_utils.TestCase): class UnixReadPipeTransportTests(test_utils.TestCase): def setUp(self): + super().setUp() self.loop = self.new_test_loop() self.protocol = test_utils.make_test_protocol(asyncio.Protocol) self.pipe = mock.Mock(spec_set=io.RawIOBase) @@ -487,6 +490,7 @@ class UnixReadPipeTransportTests(test_utils.TestCase): class UnixWritePipeTransportTests(test_utils.TestCase): def setUp(self): + super().setUp() self.loop = self.new_test_loop() self.protocol = test_utils.make_test_protocol(asyncio.BaseProtocol) self.pipe = mock.Mock(spec_set=io.RawIOBase) @@ -805,6 +809,7 @@ class ChildWatcherTestsMixin: ignore_warnings = mock.patch.object(log.logger, "warning") def setUp(self): + super().setUp() self.loop = self.new_test_loop() self.running = False self.zombies = {} |