From 611d901289c85934349e5cb1f7d01f0caa194d2a Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 19 May 2013 19:39:38 -0700 Subject: [PATCH] add recursive repr test --- Lib/test/test_dictviews.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py index 4c040796f5e..ac8bfe69e60 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)