summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 8df1957..80afb27 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2383,7 +2383,13 @@ def add_subclass_tests(cls):
return super().add_done_callback(*args, **kwargs)
class Task(CommonFuture, BaseTask):
- pass
+ def __init__(self, *args, **kwargs):
+ self._check_future_called = 0
+ super().__init__(*args, **kwargs)
+
+ def _check_future(self, future):
+ self._check_future_called += 1
+ return super()._check_future(future)
class Future(CommonFuture, BaseFuture):
pass
@@ -2409,6 +2415,8 @@ def add_subclass_tests(cls):
dict(fut.calls),
{'add_done_callback': 1})
+ self.assertEqual(1, task._check_future_called)
+
# Add patched Task & Future back to the test case
cls.Task = Task
cls.Future = Future