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
/ cpython Public
< 8000 /div>

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 1 commit
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
Diff view
Next Next commit
fix tests
  • Loading branch information
kumaraditya303 committed Feb 7, 2025
commit c1523c6860cca2b363851bbd47ec31f1d854a308
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