From 43b1c33204d125e256f7a0c3086ba547b71a105e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 18 Nov 2023 03:08:23 +0300 Subject: gh-111810: Fix `test_repr_deep` from `test_userlist` on WASI (#112197) Co-authored-by: Brett Cannon --- Lib/test/test_userlist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/test/test_userlist.py b/Lib/test/test_userlist.py index 1ed67da..76d2537 100644 --- a/Lib/test/test_userlist.py +++ b/Lib/test/test_userlist.py @@ -3,6 +3,8 @@ from collections import UserList from test import list_tests import unittest +from test import support + class UserListTest(list_tests.CommonTest): type2test = UserList @@ -65,5 +67,11 @@ class UserListTest(list_tests.CommonTest): self.assertEqual(u, v) self.assertEqual(type(u), type(v)) + # Decorate existing test with recursion limit, because + # the test is for C structure, but `UserList` is a Python structure. + test_repr_deep = support.infinite_recursion()( + list_tests.CommonTest.test_repr_deep, + ) + if __name__ == "__main__": unittest.main() -- cgit v0.12