mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
fix tests in test_asyncio.test_tasks
to use correct all_tasks
(#129815)
This commit is contained in:
parent
a93a5a39fb
commit
f52a3a51eb
1 changed files with 2 additions and 3 deletions
|
@ -2757,7 +2757,6 @@ def add_subclass_tests(cls):
|
|||
# Add patched Task & Future back to the test case
|
||||
cls.Task = Task
|
||||
cls.Future = Future
|
||||
cls.all_tasks = tasks.all_tasks
|
||||
|
||||
# Add an extra unit-test
|
||||
cls.test_subclasses_ctask_cfuture = test_subclasses_ctask_cfuture
|
||||
|
@ -2883,7 +2882,7 @@ class PyTask_CFutureSubclass_Tests(BaseTaskTests, test_utils.TestCase):
|
|||
|
||||
Future = getattr(futures, '_CFuture', None)
|
||||
Task = tasks._PyTask
|
||||
all_tasks = tasks._py_all_tasks
|
||||
all_tasks = staticmethod(tasks._py_all_tasks)
|
||||
|
||||
|
||||
@unittest.skipUnless(hasattr(tasks, '_CTask'),
|
||||
|
@ -2916,7 +2915,7 @@ class PyTask_PyFuture_Tests(BaseTaskTests, SetMethodsTest,
|
|||
class PyTask_PyFuture_SubclassTests(BaseTaskTests, test_utils.TestCase):
|
||||
Task = tasks._PyTask
|
||||
Future = futures._PyFuture
|
||||
|
||||
all_tasks = staticmethod(tasks._py_all_tasks)
|
||||
|
||||
@unittest.skipUnless(hasattr(tasks, '_CTask'),
|
||||
'requires the C _asyncio module')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue