Tests that functions can be skipped CLI :: skip:
(capfd, retreal_f77, monkeypatch)
| 269 | |
| 270 | @pytest.mark.xfail |
| 271 | def test_f2py_skip(capfd, retreal_f77, monkeypatch): |
| 272 | """Tests that functions can be skipped |
| 273 | CLI :: skip: |
| 274 | """ |
| 275 | foutl = get_io_paths(retreal_f77, mname="test") |
| 276 | ipath = foutl.finp |
| 277 | toskip = "t0 t4 t8 sd s8 s4" |
| 278 | remaining = "td s0" |
| 279 | monkeypatch.setattr( |
| 280 | sys, "argv", |
| 281 | f'f2py {ipath} -m test skip: {toskip}'.split()) |
| 282 | |
| 283 | with util.switchdir(ipath.parent): |
| 284 | f2pycli() |
| 285 | out, err = capfd.readouterr() |
| 286 | for skey in toskip.split(): |
| 287 | assert ( |
| 288 | f'buildmodule: Could not found the body of interfaced routine "{skey}". Skipping.' |
| 289 | in err) |
| 290 | for rkey in remaining.split(): |
| 291 | assert f'Constructing wrapper function "{rkey}"' in out |
| 292 | |
| 293 | |
| 294 | def test_f2py_only(capfd, retreal_f77, monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…