Check that pyf files are correctly generated with module structure CLI :: -m -h pyf_file BUG: numpy-gh #20520
(capfd, hello_world_f77, monkeypatch)
| 362 | |
| 363 | |
| 364 | def test_mod_gen_gh25263(capfd, hello_world_f77, monkeypatch): |
| 365 | """Check that pyf files are correctly generated with module structure |
| 366 | CLI :: -m <name> -h pyf_file |
| 367 | BUG: numpy-gh #20520 |
| 368 | """ |
| 369 | MNAME = "hi" |
| 370 | foutl = get_io_paths(hello_world_f77, mname=MNAME) |
| 371 | ipath = foutl.finp |
| 372 | monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m {MNAME} -h hi.pyf'.split()) |
| 373 | with util.switchdir(ipath.parent): |
| 374 | f2pycli() |
| 375 | with Path('hi.pyf').open() as hipyf: |
| 376 | pyfdat = hipyf.read() |
| 377 | assert "python module hi" in pyfdat |
| 378 | |
| 379 | |
| 380 | def test_lower_cmod(capfd, hello_world_f77, monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…