diff options
author | Tom Krauss <thomas.p.krauss@gmail.com> | 2017-03-12 20:08:23 -0500 |
---|---|---|
committer | Tom Krauss <thomas.p.krauss@gmail.com> | 2017-03-12 20:08:23 -0500 |
commit | 5cf1d2c7f514baae8912bc0b89b2767a545bf602 (patch) | |
tree | db5e324c2e5e50aed94825b91f8eb8fb0a2610ad | |
parent | 2438e1714b363623a496853a8be0aade2442e6ee (diff) | |
download | cffi-5cf1d2c7f514baae8912bc0b89b2767a545bf602.tar.gz |
fix test (now apparently cast(p, -1.1j) == cast(p, -1.1j))
Remove a printf.
-rw-r--r-- | c/_cffi_backend.c | 1 | ||||
-rw-r--r-- | c/test_c.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c index fca8f11..87654f1 100644 --- a/c/_cffi_backend.c +++ b/c/_cffi_backend.c @@ -2965,7 +2965,6 @@ static PyObject *cdata_complex(PyObject *cd_, PyObject *noarg) 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 index 8ca5f8f..eee1234 100644 --- a/c/test_c.py +++ b/c/test_c.py @@ -206,7 +206,7 @@ def test_complex_types(): 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 |