gh-111810: Fix `test_repr_deep` from `test_userlist` on WASI (#112197)

Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
Nikita Sobolev 2023-11-18 03:08:23 +03:00 committed by GitHub
parent f489ace9e7
commit 43b1c33204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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()