Ensures that a signature file is generated via the CLI CLI :: -h
(capfd, hello_world_f90, monkeypatch)
| 178 | |
| 179 | |
| 180 | def 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 | |
| 195 | def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch): |