add recursive repr test

This commit is contained in:
Benjamin Peterson 2013-05-19 19:39:38 -07:00
parent 6a55dc3b4a
commit 611d901289
1 changed files with 5 additions and 0 deletions

View File

@ -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)