8000 fix tests in `test_asyncio.test_tasks` to use correct `all_tasks` by kumaraditya303 · Pull Request #129815 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

fix tests in test_asyncio.test_tasks to use correct all_tasks #129815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
5 changes: 2 additions & 3 deletions Lib/test/test_asyncio/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,6 @@ async def func():
# 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
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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')
Expand Down
Loading
0