From: Benjamin Peterson Date: Mon, 20 May 2013 02:39:38 +0000 (-0700) Subject: add recursive repr test X-Git-Tag: v3.4.0a1~676^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=611d901289c85934349e5cb1f7d01f0caa194d2a;p=thirdparty%2FPython%2Fcpython.git add recursive repr test --- diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py index 4c040796f5e2..ac8bfe69e601 100644 --- a/Lib/test/test_dictviews.py +++ b/Lib/test/test_dictviews.py @@ -179,6 +179,11 @@ class DictSetTest(unittest.TestCase): self.assertTrue(de.items().isdisjoint(de.items())) self.assertTrue(de.items().isdisjoint([1])) + def test_recursive_repr(self): + d = {} + d[42] = d.values() + self.assertRaises(RuntimeError, repr, d) + def test_main(): support.run_unittest(DictSetTest)