[pypy-commit] pypy cpyext-ext: Add an XXX

arigo pypy.commits at gmail.com
Tue Mar 1 14:16:40 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: cpyext-ext
Changeset: r82642:d290ba429283
Date: 2016-03-01 20:04 +0100
http://bitbucket.org/pypy/pypy/changeset/d290ba429283/

Log:	Add an XXX

diff --git a/pypy/module/cpyext/test/test_typeobject.py b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -517,6 +517,10 @@
         assert float(F(10.5)) == -66.66
         assert module.nb_float(int, I(10)) == 10.0
         assert module.nb_float(float, F(10.5)) == 10.5
+        # XXX but the subtype's tp_as_number->nb_float(x) should really invoke
+        # the user-defined __float__(); it doesn't so far
+        #assert module.nb_float(I, I(10)) == -55.55
+        #assert module.nb_float(F, F(10.5)) == -66.66
 
     def test_tp_call(self):
         module = self.import_extension('foo', [


More information about the pypy-commit mailing list