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

Function test_mod_gen_f77

numpy/f2py/tests/test_f2py2e.py:325–339  ·  view source on GitHub ↗

Checks the generation of files based on a module name CLI :: -m

(capfd, hello_world_f90, monkeypatch)

Source from the content-addressed store, hash-verified

323
324
325def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch):
326 """Checks the generation of files based on a module name
327 CLI :: -m
328 """
329 MNAME = "hi"
330 foutl = get_io_paths(hello_world_f90, mname=MNAME)
331 ipath = foutl.f90inp
332 monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m {MNAME}'.split())
333 with util.switchdir(ipath.parent):
334 f2pycli()
335
336 # Always generate C module
337 assert Path.exists(foutl.cmodf)
338 # File contains a function, check for F77 wrappers
339 assert Path.exists(foutl.wrap77)
340
341
342def test_mod_gen_gh25263(capfd, hello_world_f77, monkeypatch):

Callers

nothing calls this directly

Calls 3

get_io_pathsFunction · 0.85
splitMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected