From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../numpy/f2py/tests/test_abstract_interface.py | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py (limited to '.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py') 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 00000000..42902913 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_abstract_interface.py @@ -0,0 +1,25 @@ +from pathlib import Path +import pytest +import textwrap +from . import util +from numpy.f2py import crackfortran +from numpy.testing import IS_WASM + + +@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess") +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" -- cgit 1.4.1