Author: Tom Krauss <[email protected]>
Branch: sirtom67/float_complex
Changeset: r2906:38562ef9d8f7
Date: 2017-03-12 20:08 -0500
http://bitbucket.org/cffi/cffi/changeset/38562ef9d8f7/
Log: fix test (now apparently cast(p, -1.1j) == cast(p, -1.1j)) Remove a
printf.
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -2965,7 +2965,6 @@
Py_complex value = read_raw_complex_data(cd->c_data,
cd->c_type->ct_size);
PyObject *op = PyComplex_FromCComplex(value);
PyComplexObject *opc = (PyComplexObject *) op;
- printf("%f %f\n",opc->cval.real,opc->cval.imag);
return op;
}
PyErr_Format(PyExc_TypeError, "complex() not supported on cdata '%s'",
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -206,7 +206,7 @@
assert complex(cast(p, 1E200+3j)) == INF+3j # limited range
assert complex(cast(p, complex(3,1E200))) == complex(3,INF) #
limited range
- assert cast(p, -1.1j) != cast(p, -1.1j)
+ assert cast(p, -1.1j) == cast(p, -1.1j)
assert repr(complex(cast(p, -0.0)).real) == '-0.0'
#assert repr(complex(cast(p, -0j))) == '-0j' #
http://bugs.python.org/issue29602
assert complex(cast(p, b'\x09')) == 9.0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit