Author: Armin Rigo <[email protected]>
Branch: cpyext-gc-support-2
Changeset: r82100:2eef9245adc0
Date: 2016-02-06 19:10 +0100
http://bitbucket.org/pypy/pypy/changeset/2eef9245adc0/
Log: Pass a few more tests
diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -616,8 +616,7 @@
@specialize.ll()
def wrapper(*args):
- from pypy.module.cpyext.pyobject import make_ref, from_ref
- from pypy.module.cpyext.pyobject import Reference
+ from pypy.module.cpyext.pyobject import make_ref, from_ref, is_pyobj
# we hope that malloc removal removes the newtuple() that is
# inserted exactly here by the varargs specializer
if gil_acquire:
diff --git a/pypy/module/cpyext/pyobject.py b/pypy/module/cpyext/pyobject.py
--- a/pypy/module/cpyext/pyobject.py
+++ b/pypy/module/cpyext/pyobject.py
@@ -227,7 +227,7 @@
def debug_collect():
- rawrefcount._collect(track_allocation=False)
+ rawrefcount._collect()
def as_pyobj(space, w_obj):
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
@@ -130,11 +130,10 @@
def check_and_print_leaks(self):
debug_collect()
- return #ZZZ
# check for sane refcnts
import gc
- if not self.enable_leak_checking:
+ if 1: #ZZZ not self.enable_leak_checking:
leakfinder.stop_tracking_allocations(check=False)
return False
@@ -199,6 +198,9 @@
"the test actually passed in the first place; if it failed "
"it is likely to reach this place.")
+ def test_only_import(self):
+ import cpyext
+
def test_load_error(self):
import cpyext
raises(ImportError, cpyext.load_module, "missing.file", "foo")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit