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

Skip to content

Commit b5fe07e

Browse files
committed
TST: Add a test for gh-22648
1 parent e1e5662 commit b5fe07e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from . import util
88
from numpy.f2py import crackfortran
99
import textwrap
10+
import contextlib
11+
import io
1012

1113

1214
class TestNoSpace(util.F2PyTest):
@@ -276,3 +278,10 @@ class TestUnicodeComment(util.F2PyTest):
276278
)
277279
def test_encoding_comment(self):
278280
self.module.foo(3)
281+
282+
class TestF77CommonBlockReader():
283+
def test_gh22648(self, tmp_path):
284+
fpath = util.getpath("tests", "src", "crackfortran", "gh22648.pyf")
285+
with contextlib.redirect_stdout(io.StringIO()) as stdout_f2py:
286+
mod = crackfortran.crackfortran([str(fpath)])
287+
assert "Mismatch" not in stdout_f2py.getvalue()

0 commit comments

Comments
 (0)
0