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

Function test_f2py_only

numpy/f2py/tests/test_f2py2e.py:294–314  ·  view source on GitHub ↗

Test that functions can be kept by only: CLI :: only:

(capfd, retreal_f77, monkeypatch)

Source from the content-addressed store, hash-verified

292
293
294def test_f2py_only(capfd, retreal_f77, monkeypatch):
295 """Test that functions can be kept by only:
296 CLI :: only:
297 """
298 foutl = get_io_paths(retreal_f77, mname="test")
299 ipath = foutl.finp
300 toskip = "t0 t4 t8 sd s8 s4"
301 tokeep = "td s0"
302 monkeypatch.setattr(
303 sys, "argv",
304 f'f2py {ipath} -m test only: {tokeep}'.split())
305
306 with util.switchdir(ipath.parent):
307 f2pycli()
308 out, err = capfd.readouterr()
309 for skey in toskip.split():
310 assert (
311 f'buildmodule: Could not find the body of interfaced routine "{skey}". Skipping.'
312 in err)
313 for rkey in tokeep.split():
314 assert f'Constructing wrapper function "{rkey}"' in out
315
316
317def test_file_processing_switch(capfd, hello_world_f90, retreal_f77,

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…