summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-04 00:43:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-04 00:43:01 (GMT)
commitecdae19fbe9506fffe6616d86f3bbf4a1858f3e2 (patch)
treec4ce3ae37922e1b9cfff5f835e2c2b55ad306ce1 /Lib/test
parent37559a085b423e4f2c1d512fb8296cae27c9317b (diff)
downloadcpython-ecdae19fbe9506fffe6616d86f3bbf4a1858f3e2.zip
cpython-ecdae19fbe9506fffe6616d86f3bbf4a1858f3e2.tar.gz
cpython-ecdae19fbe9506fffe6616d86f3bbf4a1858f3e2.tar.bz2
do correct lookup of the __complex__ method
Diffstat (limited to 'Lib/test')
-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 10b5af9..418337b 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1691,6 +1691,8 @@ order (MRO) for bases """
return []
def zero(self):
return 0
+ def complex_num(self):
+ return 1j
def stop(self):
raise StopIteration
def return_true(self, thing=None):
@@ -1725,6 +1727,7 @@ order (MRO) for bases """
set(("__bases__",)), {}),
("__enter__", run_context, iden, set(), {"__exit__" : swallow}),
("__exit__", run_context, swallow, set(), {"__enter__" : iden}),
+ ("__complex__", complex, complex_num, set(), {}),
]
class Checker(object):