summaryrefslogtreecommitdiff
path: root/Lib/asyncio/test_utils.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-04 14:30:41 -0400
committerYury Selivanov <yury@magic.io>2016-11-04 14:30:41 -0400
commita494e34ca1167667f6b53f34d1452f5621ee0e46 (patch)
tree60d89ce8fd0f48b198b9edabd82f61f31093891d /Lib/asyncio/test_utils.py
parentca2d8be4ba3c0ab25fd42567df52300b560aadc5 (diff)
parent69312fa4a2712b3ff37e473c833a42162aa9b5cd (diff)
downloadcpython-git-a494e34ca1167667f6b53f34d1452f5621ee0e46.tar.gz
Merge 3.6 (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 fdd3ba0e41..99e3839f45 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