summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dictviews.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-05-20 02:39:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-05-20 02:39:38 (GMT)
commit611d901289c85934349e5cb1f7d01f0caa194d2a (patch)
tree7ade26bf5903f77958bb1fb5b2f99cc04b79d091 /Lib/test/test_dictviews.py
parent6a55dc3b4a049d4cdc6458aa945695c9373991d7 (diff)
downloadcpython-611d901289c85934349e5cb1f7d01f0caa194d2a.zip
cpython-611d901289c85934349e5cb1f7d01f0caa194d2a.tar.gz
cpython-611d901289c85934349e5cb1f7d01f0caa194d2a.tar.bz2
add recursive repr test
Diffstat (limited to 'Lib/test/test_dictviews.py')
-rw-r--r--Lib/test/test_dictviews.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py
index 4c04079..ac8bfe6 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)