MCPcopy Index your code
hub / github.com/numpy/numpy / test_f2py_skip

Function test_f2py_skip

numpy/f2py/tests/test_f2py2e.py:271–291  ·  view source on GitHub ↗

Tests that functions can be skipped CLI :: skip:

(capfd, retreal_f77, monkeypatch)

Source from the content-addressed store, hash-verified

269
270@pytest.mark.xfail
271def test_f2py_skip(capfd, retreal_f77, monkeypatch):
272 """Tests that functions can be skipped
273 CLI :: skip:
274 """
275 foutl = get_io_paths(retreal_f77, mname="test")
276 ipath = foutl.finp
277 toskip = "t0 t4 t8 sd s8 s4"
278 remaining = "td s0"
279 monkeypatch.setattr(
280 sys, "argv",
281 f'f2py {ipath} -m test skip: {toskip}'.split())
282
283 with util.switchdir(ipath.parent):
284 f2pycli()
285 out, err = capfd.readouterr()
286 for skey in toskip.split():
287 assert (
288 f'buildmodule: Could not found the body of interfaced routine "{skey}". Skipping.'
289 in err)
290 for rkey in remaining.split():
291 assert f'Constructing wrapper function "{rkey}"' in out
292
293
294def test_f2py_only(capfd, retreal_f77, monkeypatch):

Callers

nothing calls this directly

Calls 2

get_io_pathsFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…