10000 TST: Add a test for gh-19161 [f2py] · charris/numpy@33fcf1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 33fcf1d

Browse files
HaoZekecharris
authored andcommitted
TST: Add a test for numpygh-19161 [f2py]
1 parent abdcb43 commit 33fcf1d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module typedefmod
2+
use iso_fortran_env, only: real32
3+
end module typedefmod
4+
5+
module data
6+
use typedefmod, only: real32
7+
implicit none
8+
real(kind=real32) :: x
9+
common/test/x
10+
end module data

numpy/f2py/tests/test_common.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ def test_common_block(self):
1616
assert self.module.block.long_bn == np.array(1.0, dtype=np.float64)
1717
assert self.module.block.string_bn == np.array("2", dtype="|S1")
1818
assert self.module.block.ok == np.array(3, dtype=np.int32)
19+
20+
21+
class TestCommonWithUse(util.F2PyTest):
22+
sources = [util.getpath("tests", "src", "common", "gh19161.f90")]
23+
24+
@pytest.mark.skipif(sys.platform == "win32",
25+
reason="Fails with MinGW64 Gfortran (Issue #9673)")
26+
def test_common_gh19161(self):
27+
assert self.module.data.x == 0

0 commit comments

Comments
 (0)
0