summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-11-18 00:08:23 (GMT)
committerGitHub <noreply@github.com>2023-11-18 00:08:23 (GMT)
commit43b1c33204d125e256f7a0c3086ba547b71a105e (patch)
tree7f91252635e7a40aaf6ae8e760729c2469f07249
parentf489ace9e7aaa29b5a83b0a74a247abc8b032910 (diff)
downloadcpython-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.py8
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()