Ensures that a signature file is generated via the CLI CLI :: -h
(capfd, hello_world_f90, monkeypatch)
| 156 | |
| 157 | |
| 158 | def 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 | |
| 173 | def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch): |