Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_repr_deep
test_userlist
1 parent f489ace commit 43b1c33Copy full SHA for 43b1c33
1 file changed
Lib/test/test_userlist.py
@@ -3,6 +3,8 @@
3
from collections import UserList
4
from test import list_tests
5
import unittest
6
+from test import support
7
+
8
9
class UserListTest(list_tests.CommonTest):
10
type2test = UserList
@@ -65,5 +67,11 @@ def test_userlist_copy(self):
65
67
self.assertEqual(u, v)
66
68
self.assertEqual(type(u), type(v))
69
70
+ # Decorate existing test with recursion limit, because
71
+ # the test is for C structure, but `UserList` is a Python structure.
72
+ test_repr_deep = support.infinite_recursion()(
73
+ list_tests.CommonTest.test_repr_deep,
74
+ )
75
76
if __name__ == "__main__":
77
unittest.main()
0 commit comments