Check that pyf files are correctly generated with module structure CLI :: -m -h pyf_file BUG: numpy-gh #20520
(capfd, hello_world_f77, monkeypatch)
| 340 | |
| 341 | |
| 342 | def test_mod_gen_gh25263(capfd, hello_world_f77, monkeypatch): |
| 343 | """Check that pyf files are correctly generated with module structure |
| 344 | CLI :: -m <name> -h pyf_file |
| 345 | BUG: numpy-gh #20520 |
| 346 | """ |
| 347 | MNAME = "hi" |
| 348 | foutl = get_io_paths(hello_world_f77, mname=MNAME) |
| 349 | ipath = foutl.finp |
| 350 | monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m {MNAME} -h hi.pyf'.split()) |
| 351 | with util.switchdir(ipath.parent): |
| 352 | f2pycli() |
| 353 | with Path('hi.pyf').open() as hipyf: |
| 354 | pyfdat = hipyf.read() |
| 355 | assert "python module hi" in pyfdat |
| 356 | |
| 357 | |
| 358 | def test_lower_cmod(capfd, hello_world_f77, monkeypatch): |
nothing calls this directly
no test coverage detected