- Add 7a76a381534012af4790e815140d1538510b7d93.patch to fix bsc#1111657 (we need use to proper void returning function not to corrupt memory in tests). OBS-URL: https://build.opensuse.org/request/show/645313 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=57
30 lines
897 B
Diff
30 lines
897 B
Diff
# HG changeset patch
|
|
# User Armin Rigo <arigo@tunes.org>
|
|
# Date 1536088314 -7200
|
|
# Node ID 7a76a381534012af4790e815140d1538510b7d93
|
|
# Parent ef09637b23147f63a7d3fda628fa1704c97f1c72
|
|
Issue #382
|
|
|
|
Second fix attempt, thanks Adam
|
|
|
|
--- a/testing/cffi0/test_function.py
|
|
+++ b/testing/cffi0/test_function.py
|
|
@@ -45,14 +45,14 @@ class TestFunction(object):
|
|
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_lround_no_return_value(self):
|
|
# check that 'void'-returning functions work too
|
|
ffi = FFI(backend=self.Backend())
|
|
ffi.cdef("""
|
|
- void sin(double x);
|
|
+ void lround(double x);
|
|
""")
|
|
m = ffi.dlopen(lib_m)
|
|
- x = m.sin(1.23)
|
|
+ x = m.lround(1.23)
|
|
assert x is None
|
|
|
|
def test_dlopen_filename(self):
|