Author: mattip <[email protected]>
Branch:
Changeset: r76014:3a472fd0f59f
Date: 2015-02-20 15:55 +0200
http://bitbucket.org/pypy/pypy/changeset/3a472fd0f59f/
Log: try to debug test that fails only on full test runs
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
b/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
--- a/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
+++ b/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
@@ -272,7 +272,11 @@
{
double x, sum=0.0, dx=(b-a)/(double)nstep;
for(x=a+0.5*dx; (b-x)*(x-a)>0.0; x+=dx)
+ {
+ double y = f(x);
+ printf("f(x)=%.1f\n", y);
sum += f(x);
+ }
return sum/(double)nstep;
}
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
@@ -138,6 +138,7 @@
integrate.restype = c_double
def func(x):
+ print 'calculating x**2 of',x
return x**2
result = integrate(0.0, 1.0, CALLBACK(func), 10)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit