diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-12-18 15:06:45 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-12-18 15:06:45 (GMT) |
commit | 9d254f70928644cb573b0321c912eaabd012bfc4 (patch) | |
tree | 80cdf1c39c62b8b288a450e030ddccaa9b3a6b0c /Lib/test/test_descr.py | |
parent | c79cf042505d10f134b741f6836e4abfacbcd24f (diff) | |
download | cpython-9d254f70928644cb573b0321c912eaabd012bfc4.zip cpython-9d254f70928644cb573b0321c912eaabd012bfc4.tar.gz cpython-9d254f70928644cb573b0321c912eaabd012bfc4.tar.bz2 |
Merged revisions 87368 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87368 | ezio.melotti | 2010-12-18 15:59:43 +0100 (Sat, 18 Dec 2010) | 1 line
#5587: add a repr to dict_proxy objects. Patch by David Stanek and Daniel Urban.
........
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 9c26ed3..e1c928f 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4262,6 +4262,11 @@ class DictProxyTests(unittest.TestCase): pass self.assertEqual(type(C.__dict__), type(B.__dict__)) + def test_repr(self): + # Testing dict_proxy.__repr__ + dict_ = {k: v for k, v in self.C.__dict__.items()} + self.assertEqual(repr(self.C.__dict__), 'dict_proxy({!r})'.format(dict_)) + class PTypesLongInitTest(unittest.TestCase): # This is in its own TestCase so that it can be run before any other tests. |