mirror of https://github.com/python/cpython
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:
parent
f489ace9e7
commit
43b1c33204
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue