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

Function test_gen_pyf

numpy/f2py/tests/test_f2py2e.py:180–192  ·  view source on GitHub ↗

Ensures that a signature file is generated via the CLI CLI :: -h

(capfd, hello_world_f90, monkeypatch)

Source from the content-addressed store, hash-verified

178
179
180def test_gen_pyf(capfd, hello_world_f90, monkeypatch):
181 """Ensures that a signature file is generated via the CLI
182 CLI :: -h
183 """
184 ipath = Path(hello_world_f90)
185 opath = Path(hello_world_f90).stem + ".pyf"
186 monkeypatch.setattr(sys, "argv", f'f2py -h {opath} {ipath}'.split())
187
188 with util.switchdir(ipath.parent):
189 f2pycli() # Generate wrappers
190 out, _ = capfd.readouterr()
191 assert "Saving signatures to file" in out
192 assert Path(f'{opath}').exists()
193
194
195def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch):

Callers

nothing calls this directly

Calls 2

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…