[pypy-commit] cffi default: Issue #382
arigo
pypy.commits at gmail.com
Tue Sep 4 08:24:35 EDT 2018
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r3156:ef09637b2314
Date: 2018-09-04 14:24 +0200
http://bitbucket.org/cffi/cffi/changeset/ef09637b2314/
Log: Issue #382
Change the test to a non-floating-point example, where ignoring the
return value should work even on x87.
diff --git a/testing/cffi0/test_function.py b/testing/cffi0/test_function.py
--- a/testing/cffi0/test_function.py
+++ b/testing/cffi0/test_function.py
@@ -45,14 +45,15 @@
assert x != math.sin(1.23) # rounding effects
assert abs(x - math.sin(1.23)) < 1E-6
- def test_sin_no_return_value(self):
+ def test_getenv_no_return_value(self):
# check that 'void'-returning functions work too
ffi = FFI(backend=self.Backend())
ffi.cdef("""
- void sin(double x);
+ void getenv(char *);
""")
- m = ffi.dlopen(lib_m)
- x = m.sin(1.23)
+ needs_dlopen_none()
+ m = ffi.dlopen(None)
+ x = m.getenv("FOO")
assert x is None
def test_dlopen_filename(self):
More information about the pypy-commit
mailing list