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

Function test_gen_pyf

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

156
157
158def test_gen_pyf(capfd, hello_world_f90, monkeypatch):
159 """Ensures that a signature file is generated via the CLI
160 CLI :: -h
161 """
162 ipath = Path(hello_world_f90)
163 opath = Path(hello_world_f90).stem + ".pyf"
164 monkeypatch.setattr(sys, "argv", f'f2py -h {opath} {ipath}'.split())
165
166 with util.switchdir(ipath.parent):
167 f2pycli() # Generate wrappers
168 out, _ = capfd.readouterr()
169 assert "Saving signatures to file" in out
170 assert Path(f'{opath}').exists()
171
172
173def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch):

Callers

nothing calls this directly

Calls 2

splitMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected