Author: Armin Rigo <[email protected]>
Branch: cpyext-gc-support
Changeset: r80424:d73986739e27
Date: 2015-10-24 16:21 +0200
http://bitbucket.org/pypy/pypy/changeset/d73986739e27/
Log: fix test (notably, foo_bar() now prints the same thing as on
CPython)
diff --git a/pypy/module/cpyext/test/test_cpyext.py
b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -112,7 +112,7 @@
@staticmethod
def cleanup_references(space):
- ZZZ
+ return #ZZZ
state = space.fromcache(RefcountState)
import gc; gc.collect()
@@ -374,8 +374,6 @@
def teardown_method(self, func):
for name in self.imported_module_names:
self.unimport_module(name)
- self.check_and_print_leaks()
- return #ZZZ
self.cleanup_references(self.space)
# XXX: find out how to disable check_and_print_leaks() if the
# test failed...
@@ -656,7 +654,7 @@
Py_DECREF(true_obj);
Py_DECREF(true_obj);
fprintf(stderr, "REFCNT %i %i\\n", refcnt, refcnt_after);
- return PyBool_FromLong(refcnt_after == refcnt+2 && refcnt < 3);
+ return PyBool_FromLong(refcnt_after == refcnt + 2);
}
static PyObject* foo_bar(PyObject* self, PyObject *args)
{
@@ -672,7 +670,7 @@
refcnt_after = true_obj->ob_refcnt;
Py_DECREF(tup);
fprintf(stderr, "REFCNT2 %i %i\\n", refcnt, refcnt_after);
- return PyBool_FromLong(refcnt_after == refcnt);
+ return PyBool_FromLong(refcnt_after == refcnt + 1);
}
static PyMethodDef methods[] = {
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit