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

Function test_mod_gen_f77

numpy/f2py/tests/test_f2py2e.py:347–361  ·  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

345
346
347def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch):
348 """Checks the generation of files based on a module name
349 CLI :: -m
350 """
351 MNAME = "hi"
352 foutl = get_io_paths(hello_world_f90, mname=MNAME)
353 ipath = foutl.f90inp
354 monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m {MNAME}'.split())
355 with util.switchdir(ipath.parent):
356 f2pycli()
357
358 # Always generate C module
359 assert Path.exists(foutl.cmodf)
360 # File contains a function, check for F77 wrappers
361 assert Path.exists(foutl.wrap77)
362
363
364def test_mod_gen_gh25263(capfd, hello_world_f77, monkeypatch):

Callers

nothing calls this directly

Calls 3

get_io_pathsFunction · 0.85
splitMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…