GH-120804: Remove PidfdChildWatcher, ThreadedChildWatcher and AbstractChildWatcher from asyncio APIs (#120893)

This commit is contained in:
Kumar Aditya 2024-06-23 18:38:50 +05:30 committed by GitHub
parent b6fa8fe86a
commit 9d2e1ea386
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 259 deletions

View file

@ -1112,32 +1112,6 @@ class UnixWritePipeTransportTests(test_utils.TestCase):
self.assertFalse(self.protocol.connection_lost.called)
class AbstractChildWatcherTests(unittest.TestCase):
def test_warns_on_subclassing(self):
with self.assertWarns(DeprecationWarning):
class MyWatcher(asyncio.AbstractChildWatcher):
pass
def test_not_implemented(self):
f = mock.Mock()
watcher = asyncio.AbstractChildWatcher()
self.assertRaises(
NotImplementedError, watcher.add_child_handler, f, f)
self.assertRaises(
NotImplementedError, watcher.remove_child_handler, f)
self.assertRaises(
NotImplementedError, watcher.attach_loop, f)
self.assertRaises(
NotImplementedError, watcher.close)
self.assertRaises(
NotImplementedError, watcher.is_active)
self.assertRaises(
NotImplementedError, watcher.__enter__)
self.assertRaises(
NotImplementedError, watcher.__exit__, f, f, f)
class TestFunctional(unittest.TestCase):
def setUp(self):