summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/list_tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py
index 1c799d760e..a0011a46fb 100644
--- a/Lib/test/list_tests.py
+++ b/Lib/test/list_tests.py
@@ -46,6 +46,11 @@ class CommonTest(seq_tests.CommonTest):
self.assertEqual(str(a2), "[0, 1, 2, [...], 3]")
self.assertEqual(repr(a2), "[0, 1, 2, [...], 3]")
+ l0 = []
+ for i in xrange(sys.getrecursionlimit() + 100):
+ l0 = [l0]
+ self.assertRaises(RuntimeError, repr, l0)
+
def test_print(self):
d = self.type2test(xrange(200))
d.append(d)