diff options
author | Kumar Aditya <kumaraditya@python.org> | 2024-06-23 13:08:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-23 13:08:50 (GMT) |
commit | 9d2e1ea3862e5950d48b45ac57995a206e33f38b (patch) | |
tree | 3e0287e48b16fe56015cb8d725d05f268b392743 /Lib/test/test_asyncio/test_events.py | |
parent | b6fa8fe86a6f4d02c263682716a91285a94024fc (diff) | |
download | cpython-9d2e1ea3862e5950d48b45ac57995a206e33f38b.zip cpython-9d2e1ea3862e5950d48b45ac57995a206e33f38b.tar.gz cpython-9d2e1ea3862e5950d48b45ac57995a206e33f38b.tar.bz2 |
GH-120804: Remove `PidfdChildWatcher`, `ThreadedChildWatcher` and `AbstractChildWatcher` from asyncio APIs (#120893)
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 5b660de..34ea02b 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2209,22 +2209,8 @@ if sys.platform == 'win32': else: import selectors - class UnixEventLoopTestsMixin(EventLoopTestsMixin): - def setUp(self): - super().setUp() - watcher = asyncio.ThreadedChildWatcher() - watcher.attach_loop(self.loop) - policy = asyncio.get_event_loop_policy() - policy._watcher = watcher - - def tearDown(self): - policy = asyncio.get_event_loop_policy() - policy._watcher = None - super().tearDown() - - if hasattr(selectors, 'KqueueSelector'): - class KqueueEventLoopTests(UnixEventLoopTestsMixin, + class KqueueEventLoopTests(EventLoopTestsMixin, SubprocessTestsMixin, test_utils.TestCase): @@ -2249,7 +2235,7 @@ else: super().test_write_pty() if hasattr(selectors, 'EpollSelector'): - class EPollEventLoopTests(UnixEventLoopTestsMixin, + class EPollEventLoopTests(EventLoopTestsMixin, SubprocessTestsMixin, test_utils.TestCase): @@ -2257,7 +2243,7 @@ else: return asyncio.SelectorEventLoop(selectors.EpollSelector()) if hasattr(selectors, 'PollSelector'): - class PollEventLoopTests(UnixEventLoopTestsMixin, + class PollEventLoopTests(EventLoopTestsMixin, SubprocessTestsMixin, test_utils.TestCase): @@ -2265,7 +2251,7 @@ else: return asyncio.SelectorEventLoop(selectors.PollSelector()) # Should always exist. - class SelectEventLoopTests(UnixEventLoopTestsMixin, + class SelectEventLoopTests(EventLoopTestsMixin, SubprocessTestsMixin, test_utils.TestCase): @@ -2830,10 +2816,6 @@ class GetEventLoopTestsMixin: def tearDown(self): try: - if sys.platform != 'win32': - policy = asyncio.get_event_loop_policy() - policy._watcher = None - super().tearDown() finally: self.loop.close() |