Tests that it is possible to return to file processing mode CLI :: : BUG: numpy-gh #20520
(capfd, hello_world_f90, retreal_f77,
monkeypatch)
| 293 | |
| 294 | |
| 295 | def test_file_processing_switch(capfd, hello_world_f90, retreal_f77, |
| 296 | monkeypatch): |
| 297 | """Tests that it is possible to return to file processing mode |
| 298 | CLI :: : |
| 299 | BUG: numpy-gh #20520 |
| 300 | """ |
| 301 | foutl = get_io_paths(retreal_f77, mname="test") |
| 302 | ipath = foutl.finp |
| 303 | toskip = "t0 t4 t8 sd s8 s4" |
| 304 | ipath2 = Path(hello_world_f90) |
| 305 | tokeep = "td s0 hi" # hi is in ipath2 |
| 306 | mname = "blah" |
| 307 | monkeypatch.setattr( |
| 308 | sys, |
| 309 | "argv", |
| 310 | f'f2py {ipath} -m {mname} only: {tokeep} : {ipath2}'.split( |
| 311 | ), |
| 312 | ) |
| 313 | |
| 314 | with util.switchdir(ipath.parent): |
| 315 | f2pycli() |
| 316 | out, err = capfd.readouterr() |
| 317 | for skey in toskip.split(): |
| 318 | assert ( |
| 319 | f'buildmodule: Could not find the body of interfaced routine "{skey}". Skipping.' |
| 320 | in err) |
| 321 | for rkey in tokeep.split(): |
| 322 | assert f'Constructing wrapper function "{rkey}"' in out |
| 323 | |
| 324 | |
| 325 | def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch): |
nothing calls this directly
no test coverage detected