MCPcopy Create free account
hub / github.com/numpy/numpy / test_f2py_skip

Function test_f2py_skip

numpy/f2py/tests/test_f2py2e.py:249–269  ·  view source on GitHub ↗

Tests that functions can be skipped CLI :: skip:

(capfd, retreal_f77, monkeypatch)

Source from the content-addressed store, hash-verified

247
248@pytest.mark.xfail
249def test_f2py_skip(capfd, retreal_f77, monkeypatch):
250 """Tests that functions can be skipped
251 CLI :: skip:
252 """
253 foutl = get_io_paths(retreal_f77, mname="test")
254 ipath = foutl.finp
255 toskip = "t0 t4 t8 sd s8 s4"
256 remaining = "td s0"
257 monkeypatch.setattr(
258 sys, "argv",
259 f'f2py {ipath} -m test skip: {toskip}'.split())
260
261 with util.switchdir(ipath.parent):
262 f2pycli()
263 out, err = capfd.readouterr()
264 for skey in toskip.split():
265 assert (
266 f'buildmodule: Could not found the body of interfaced routine "{skey}". Skipping.'
267 in err)
268 for rkey in remaining.split():
269 assert f'Constructing wrapper function "{rkey}"' in out
270
271
272def test_f2py_only(capfd, retreal_f77, monkeypatch):

Callers

nothing calls this directly

Calls 2

get_io_pathsFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected