Skip to content

Commit 776f881

Browse files
authored
Merge pull request numpy#26935 from paddyroddy/f2py-compile-test
BUG: fix `f2py` tests to work with v2 API
2 parents be20220 + 7622b67 commit 776f881

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self,
115115
PyArray_DESCR(arr)->type,
116116
PyArray_TYPE(arr),
117117
PyArray_ITEMSIZE(arr),
118-
PyArray_DESCR(arr)->alignment,
118+
PyDataType_ALIGNMENT(arr),
119119
PyArray_FLAGS(arr),
120120
PyArray_ITEMSIZE(arr));
121121
}

numpy/f2py/tests/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def build_meson(source_files, module_name=None, **kwargs):
328328
# compiler stack is on the CI
329329
try:
330330
backend.compile()
331-
except:
331+
except subprocess.CalledProcessError:
332332
pytest.skip("Failed to compile module")
333333

334334
# Import the compiled module

0 commit comments

Comments
 (0)