scipy/scipy-0.16.1-ctyptes-test.patch

27 lines
1000 B
Diff
Raw Normal View History

2015-11-14 12:05:41 +00:00
commit 1f5ccd5447ed2796bb8e9506cfbfdb4a82cccfc0
Author: Ralf Gommers <ralf.gommers@gmail.com>
Date: Sat Oct 24 18:17:04 2015 +0200
TST: fix issue with a ctypes test for integrate on Fedora. Closes gh-5370
diff --git a/scipy/integrate/tests/test_quadpack.py b/scipy/integrate/tests/test_quadpack.py
index c3a417c..f384c77 100644
--- a/scipy/integrate/tests/test_quadpack.py
+++ b/scipy/integrate/tests/test_quadpack.py
@@ -42,7 +42,14 @@ class TestCtypesQuad(TestCase):
file = 'libm.dylib'
else:
file = 'libm.so'
- self.lib = ctypes.CDLL(file)
+
+ try:
+ self.lib = ctypes.CDLL(file)
+ except OSError:
+ # This test doesn't work on some Linux platforms (Fedora for
+ # example) that put an ld script in libm.so - see gh-5370
+ self.skipTest("Ctypes can't import libm.so")
+
restype = ctypes.c_double
argtypes = (ctypes.c_double,)
for name in ['sin', 'cos', 'tan']: