summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/test_utils.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-04 18:30:11 (GMT)
committerYury Selivanov <yury@magic.io>2016-11-04 18:30:11 (GMT)
commit69312fa4a2712b3ff37e473c833a42162aa9b5cd (patch)
tree008bb64b7ee485a5031e94744ecf5fa22f51cf3d /Lib/asyncio/test_utils.py
parent4b8eb7b8b4d2d4c2c900f0931d475ffa951d3215 (diff)
parent600a349781bfa0a8239e1cb95fac29c7c4a3302e (diff)
downloadcpython-69312fa4a2712b3ff37e473c833a42162aa9b5cd.zip
cpython-69312fa4a2712b3ff37e473c833a42162aa9b5cd.tar.gz
cpython-69312fa4a2712b3ff37e473c833a42162aa9b5cd.tar.bz2
Merge 3.5 (issue #28613)
Diffstat (limited to 'Lib/asyncio/test_utils.py')
-rw-r--r--Lib/asyncio/test_utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
index fdd3ba0..99e3839 100644
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -449,7 +449,13 @@ class TestCase(unittest.TestCase):
self.set_event_loop(loop)
return loop
+ def setUp(self):
+ self._get_running_loop = events._get_running_loop
+ events._get_running_loop = lambda: None
+
def tearDown(self):
+ events._get_running_loop = self._get_running_loop
+
events.set_event_loop(None)
# Detect CPython bug #23353: ensure that yield/yield-from is not used