[Python-checkins] cpython (3.3): add recursive repr test
benjamin.peterson
python-checkins at python.org
Mon May 20 04:39:55 CEST 2013
http://hg.python.org/cpython/rev/f194b50105bd
changeset: 83854:f194b50105bd
branch: 3.3
parent: 83849:65680e3a7f07
user: Benjamin Peterson <benjamin at python.org>
date: Sun May 19 19:39:38 2013 -0700
summary:
add recursive repr test
files:
Lib/test/test_dictviews.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py
--- a/Lib/test/test_dictviews.py
+++ b/Lib/test/test_dictviews.py
@@ -179,6 +179,11 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list