From 7dc505b8655b3e48b93a4274dfd26e5856d9c64f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 26 Aug 2021 15:48:24 +0300 Subject: bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Langa --- Lib/test/test_asyncio/functional.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Lib/test/test_asyncio/functional.py') diff --git a/Lib/test/test_asyncio/functional.py b/Lib/test/test_asyncio/functional.py index 74490a869de..d19c7a612cc 100644 --- a/Lib/test/test_asyncio/functional.py +++ b/Lib/test/test_asyncio/functional.py @@ -29,10 +29,6 @@ class FunctionalTestCaseMixin: self.loop.set_exception_handler(self.loop_exception_handler) self.__unhandled_exceptions = [] - # Disable `_get_running_loop`. - self._old_get_running_loop = asyncio.events._get_running_loop - asyncio.events._get_running_loop = lambda: None - def tearDown(self): try: self.loop.close() @@ -43,7 +39,6 @@ class FunctionalTestCaseMixin: self.fail('unexpected calls to loop.call_exception_handler()') finally: - asyncio.events._get_running_loop = self._old_get_running_loop asyncio.set_event_loop(None) self.loop = None -- cgit v1.2.3