Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 00b9536

Browse filesBrowse files
committed
Add test
1 parent bc55838 commit 00b9536
Copy full SHA for 00b9536

File tree

Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed

‎Lib/test/test_asyncio/test_futures.py

Copy file name to clipboardExpand all lines: Lib/test/test_asyncio/test_futures.py
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,21 @@ def __eq__(self, other):
832832

833833
fut.remove_done_callback(evil())
834834

835+
def test_remove_done_callbacks_list_clear(self):
836+
# see https://github.com/python/cpython/issues/97592 for details
837+
838+
fut = self._new_future()
839+
fut.add_done_callback(str)
840+
841+
for _ in range(63):
842+
fut.add_done_callback(id)
843+
844+
class evil:
845+
def __eq__(self, other):
846+
fut.remove_done_callback(other)
847+
848+
fut.remove_done_callback(evil())
849+
835850
def test_schedule_callbacks_list_mutation_1(self):
836851
# see http://bugs.python.org/issue28963 for details
837852

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.