summaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py
diff options
context:
space:
mode:
authorblackhao <13851610112@163.com>2025-08-22 02:51:50 -0500
committerblackhao <13851610112@163.com>2025-08-22 02:51:50 -0500
commit4aab4087dc97906d0b9890035401175cdaab32d4 (patch)
tree4e2e9d88a711ec5b1cfa02e8ac72a55183b99123 /.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py
parentafa8f50d1d21c721dabcb31ad244610946ab65a3 (diff)
2.0
Diffstat (limited to '.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py')
-rw-r--r--.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py b/.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py
new file mode 100644
index 0000000..21e77db
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py
@@ -0,0 +1,26 @@
+import pytest
+
+from numpy.f2py import crackfortran
+from numpy.testing import IS_WASM
+
+from . import util
+
+
+@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")
+@pytest.mark.slow
+class TestAbstractInterface(util.F2PyTest):
+ sources = [util.getpath("tests", "src", "abstract_interface", "foo.f90")]
+
+ skip = ["add1", "add2"]
+
+ def test_abstract_interface(self):
+ assert self.module.ops_module.foo(3, 5) == (8, 13)
+
+ def test_parse_abstract_interface(self):
+ # Test gh18403
+ fpath = util.getpath("tests", "src", "abstract_interface",
+ "gh18403_mod.f90")
+ mod = crackfortran.crackfortran([str(fpath)])
+ assert len(mod) == 1
+ assert len(mod[0]["body"]) == 1
+ assert mod[0]["body"][0]["block"] == "abstract interface"