mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
GH-120804: Remove PidfdChildWatcher
, ThreadedChildWatcher
and AbstractChildWatcher
from asyncio APIs (#120893)
This commit is contained in:
parent
b6fa8fe86a
commit
9d2e1ea386
5 changed files with 39 additions and 259 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue