8000 TST: Add a test for gh-22648 · numpy/numpy@d6bdb08 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6bdb08

Browse files
committed
TST: Add a test for gh-22648
1 parent b8af21f commit d6bdb08

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
python module iri16py ! in
2+
interface ! in :iri16py
3+
block data ! in :iri16py:iridreg_modified.for
4+
COMMON /fircom/ eden,tabhe,tabla,tabmo,tabza,tabfl
5+
end block data
6+
end interface
7+
end python module iri16py

numpy/f2py/tests/test_crackfortran.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from . import util
99
from numpy.f2py import crackfortran
1010
import textwrap
11+
import contextlib
12+
import io
1113

1214

1315
class TestNoSpace(util.F2PyTest):
@@ -335,3 +337,11 @@ def test_end_if_comment(self):
335337
crackfortran.crackfortran([str(fpath)])
336338
except Exception as exc:
337339
assert False, f"'crackfortran.crackfortran' raised an exception {exc}"
340+
341+
342+
class TestF77CommonBlockReader():
343+
def test_gh22648(self, tmp_path):
344+
fpath = util.getpath("tests", "src", "crackfortran", "gh22648.pyf")
345+
with contextlib.redirect_stdout(io.StringIO()) as stdout_f2py:
346+
mod = crackfortran.crackfortran([str(fpath)])
347+
assert "Mismatch" not in stdout_f2py.getvalue()

0 commit comments

Comments
 (0)
0