8000 fix tests in `test_asyncio.test_tasks` to use correct `all_tasks` (#1… · python/cpython@f52a3a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit f52a3a5

Browse files
fix tests in test_asyncio.test_tasks to use correct all_tasks (#129815)
1 parent a93a5a3 commit f52a3a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_asyncio/test_tasks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,7 +2757,6 @@ async def func():
27572757
# Add patched Task & Future back to the test case
27582758 cls.Task = Task
27592759
cls.Future = Future
2760-
cls.all_tasks = tasks.all_tasks
27612760

27622761
# Add an extra unit-test
27632762
cls.test_subclasses_ctask_cfuture = test_subclasses_ctask_cfuture
@@ -2883,7 +2882,7 @@ class PyTask_CFutureSubclass_Tests(BaseTaskTests, test_utils.TestCase):
28832882

28842883
Future = getattr(futures, '_CFuture', None)
28852884
Task = tasks._PyTask
2886-
all_tasks = tasks._py_all_tasks
2885+
all_tasks = staticmethod(tasks._py_all_tasks)
28872886

28882887

28892888
@unittest.skipUnless(hasattr(tasks, '_CTask'),
@@ -2916,7 +2915,7 @@ class PyTask_PyFuture_Tests(BaseTaskTests, SetMethodsTest,
29162915
class PyTask_PyFuture_SubclassTests(BaseTaskTests, test_utils.TestCase):
29172916
Task = tasks._PyTask
29182917
Future = futures._PyFuture
2919-
2918+
all_tasks = staticmethod(tasks._py_all_tasks)
29202919

29212920
@unittest.skipUnless(hasattr(tasks, '_CTask'),
29222921
'requires the C _asyncio module')

0 commit comments

Comments
 (0)
0