Tests that it is possible to return to file processing mode CLI :: : BUG: numpy-gh #20520
(capfd, hello_world_f90, retreal_f77,
monkeypatch)
| 315 | |
| 316 | |
| 317 | def test_file_processing_switch(capfd, hello_world_f90, retreal_f77, |
| 318 | monkeypatch): |
| 319 | """Tests that it is possible to return to file processing mode |
| 320 | CLI :: : |
| 321 | BUG: numpy-gh #20520 |
| 322 | """ |
| 323 | foutl = get_io_paths(retreal_f77, mname="test") |
| 324 | ipath = foutl.finp |
| 325 | toskip = "t0 t4 t8 sd s8 s4" |
| 326 | ipath2 = Path(hello_world_f90) |
| 327 | tokeep = "td s0 hi" # hi is in ipath2 |
| 328 | mname = "blah" |
| 329 | monkeypatch.setattr( |
| 330 | sys, |
| 331 | "argv", |
| 332 | f'f2py {ipath} -m {mname} only: {tokeep} : {ipath2}'.split( |
| 333 | ), |
| 334 | ) |
| 335 | |
| 336 | with util.switchdir(ipath.parent): |
| 337 | f2pycli() |
| 338 | out, err = capfd.readouterr() |
| 339 | for skey in toskip.split(): |
| 340 | assert ( |
| 341 | f'buildmodule: Could not find the body of interfaced routine "{skey}". Skipping.' |
| 342 | in err) |
| 343 | for rkey in tokeep.split(): |
| 344 | assert f'Constructing wrapper function "{rkey}"' in out |
| 345 | |
| 346 | |
| 347 | def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…