summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-05 00:45:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-05 00:45:37 (GMT)
commitda2cf04c2807e3b2f80e06306242238ddddaa260 (patch)
tree647b6ca0d3a432ee1ba1a0d03f7c669c8b9d184c /Lib/test/test_descr.py
parent2d5157eb913bdf0eeefd0016ab6a621dd1727525 (diff)
downloadcpython-da2cf04c2807e3b2f80e06306242238ddddaa260.zip
cpython-da2cf04c2807e3b2f80e06306242238ddddaa260.tar.gz
cpython-da2cf04c2807e3b2f80e06306242238ddddaa260.tar.bz2
Merged revisions 81706-81707 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81706 | benjamin.peterson | 2010-06-04 19:32:50 -0500 (Fri, 04 Jun 2010) | 1 line properly lookup the __format__ special method ........ r81707 | benjamin.peterson | 2010-06-04 19:38:22 -0500 (Fri, 04 Jun 2010) | 1 line remove PyType_Ready call; float should be initialized in interpreter startup ........
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 5568dd5..10820ab 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1557,6 +1557,8 @@ order (MRO) for bases """
self.assertEqual(key, "hi")
return 4
def swallow(*args): pass
+ def format_impl(self, spec):
+ return "hello"
# It would be nice to have every special method tested here, but I'm
# only listing the ones I can remember outside of typeobject.c, since it
@@ -1575,6 +1577,7 @@ order (MRO) for bases """
("__enter__", run_context, iden, set(), {"__exit__" : swallow}),
("__exit__", run_context, swallow, set(), {"__enter__" : iden}),
("__complex__", complex, complex_num, set(), {}),
+ ("__format__", format, format_impl, set(), {}),
]
class Checker(object):