Skip to content

Commit 43b1c33

Browse files
gh-111810: Fix test_repr_deep from test_userlist on WASI (#112197)
Co-authored-by: Brett Cannon <[email protected]>
1 parent f489ace commit 43b1c33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_userlist.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from collections import UserList
44
from test import list_tests
55
import unittest
6+
from test import support
7+
68

79
class UserListTest(list_tests.CommonTest):
810
type2test = UserList
@@ -65,5 +67,11 @@ def test_userlist_copy(self):
6567
self.assertEqual(u, v)
6668
self.assertEqual(type(u), type(v))
6769

70+
# Decorate existing test with recursion limit, because
71+
# the test is for C structure, but `UserList` is a Python structure.
72+
test_repr_deep = support.infinite_recursion()(
73+
list_tests.CommonTest.test_repr_deep,
74+
)
75+
6876
if __name__ == "__main__":
6977
unittest.main()

0 commit comments

Comments
 (0)