diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-11-18 00:08:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-18 00:08:23 (GMT) |
commit | 43b1c33204d125e256f7a0c3086ba547b71a105e (patch) | |
tree | 7f91252635e7a40aaf6ae8e760729c2469f07249 | |
parent | f489ace9e7aaa29b5a83b0a74a247abc8b032910 (diff) | |
download | cpython-43b1c33204d125e256f7a0c3086ba547b71a105e.zip cpython-43b1c33204d125e256f7a0c3086ba547b71a105e.tar.gz cpython-43b1c33204d125e256f7a0c3086ba547b71a105e.tar.bz2 |
gh-111810: Fix `test_repr_deep` from `test_userlist` on WASI (#112197)
Co-authored-by: Brett Cannon <brett@python.org>
-rw-r--r-- | Lib/test/test_userlist.py | 8 |
1 files changed, 8 insertions, 0 deletions
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() |