summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_crackfortran.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/tests/test_crackfortran.py')
-rw-r--r--numpy/f2py/tests/test_crackfortran.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_crackfortran.py b/numpy/f2py/tests/test_crackfortran.py
index fb47eb31d..31dfad16e 100644
--- a/numpy/f2py/tests/test_crackfortran.py
+++ b/numpy/f2py/tests/test_crackfortran.py
@@ -44,6 +44,15 @@ class TestPublicPrivate:
assert "private" not in mod["vars"]["seta"]["attrspec"]
assert "public" in mod["vars"]["seta"]["attrspec"]
+ def test_access_type(self, tmp_path):
+ fpath = util.getpath("tests", "src", "crackfortran", "accesstype.f90")
+ mod = crackfortran.crackfortran([str(fpath)])
+ assert len(mod) == 1
+ tt = mod[0]['vars']
+ assert set(tt['a']['attrspec']) == {'private', 'bind(c)'}
+ assert set(tt['b_']['attrspec']) == {'public', 'bind(c)'}
+ assert set(tt['c']['attrspec']) == {'public'}
+
class TestExternal(util.F2PyTest):
# issue gh-17859: add external attribute support