Author: Armin Rigo <[email protected]>
Branch:
Changeset: r85882:2ffe8d3405bd
Date: 2016-07-27 19:37 +0200
http://bitbucket.org/pypy/pypy/changeset/2ffe8d3405bd/
Log: Fix two tests that have been added in 419c923b6e54 (matti: did you
mess up somehow? you said in 419c923b6e54 that the tests are
passing, but neither one is...)
diff --git a/pypy/module/cpyext/test/test_number.py
b/pypy/module/cpyext/test/test_number.py
--- a/pypy/module/cpyext/test/test_number.py
+++ b/pypy/module/cpyext/test/test_number.py
@@ -151,7 +151,6 @@
'''
PyObject *obj = PyTuple_GET_ITEM(args, 0);
int val = PyNumber_Check(obj);
- Py_DECREF(obj);
return PyInt_FromLong(val);
''')])
val = mod.test_PyNumber_Check(10)
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
@@ -800,7 +800,7 @@
IntLike_Type.tp_as_number = &intlike_as_number;
intlike_as_number.nb_nonzero = intlike_nb_nonzero;
intlike_as_number.nb_int = intlike_nb_int;
- if (PyType_Ready(&IntLike_Type) < 0) return NULL;
+ PyType_Ready(&IntLike_Type);
""")
assert not bool(module.newInt(0))
assert bool(module.newInt(1))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit