summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/tests')
-rw-r--r--numpy/f2py/tests/test_callback.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py
index 81650a819..acf8c2392 100644
--- a/numpy/f2py/tests/test_callback.py
+++ b/numpy/f2py/tests/test_callback.py
@@ -211,3 +211,27 @@ class TestF77CallbackPythonTLS(TestF77Callback):
compiler-provided
"""
options = ["-DF2PY_USE_PYTHON_TLS"]
+
+
+class TestF90Callback(util.F2PyTest):
+
+ suffix = '.f90'
+
+ code = """
+function gh17797(f, y) result(r)
+ external f
+ integer(8) :: r, f
+ integer(8), dimension(:) :: y
+ r = f(0)
+ r = r + sum(y)
+end function gh17797
+ """
+
+ def test_gh17797(self):
+
+ def incr(x):
+ return x + 123
+
+ y = np.array([1, 2, 3], dtype=np.int64)
+ r = self.module.gh17797(incr, y)
+ assert r == 123 + 1 + 2 + 3