Tests that functions can be skipped CLI :: skip:
(capfd, retreal_f77, monkeypatch)
| 247 | |
| 248 | @pytest.mark.xfail |
| 249 | def test_f2py_skip(capfd, retreal_f77, monkeypatch): |
| 250 | """Tests that functions can be skipped |
| 251 | CLI :: skip: |
| 252 | """ |
| 253 | foutl = get_io_paths(retreal_f77, mname="test") |
| 254 | ipath = foutl.finp |
| 255 | toskip = "t0 t4 t8 sd s8 s4" |
| 256 | remaining = "td s0" |
| 257 | monkeypatch.setattr( |
| 258 | sys, "argv", |
| 259 | f'f2py {ipath} -m test skip: {toskip}'.split()) |
| 260 | |
| 261 | with util.switchdir(ipath.parent): |
| 262 | f2pycli() |
| 263 | out, err = capfd.readouterr() |
| 264 | for skey in toskip.split(): |
| 265 | assert ( |
| 266 | f'buildmodule: Could not found the body of interfaced routine "{skey}". Skipping.' |
| 267 | in err) |
| 268 | for rkey in remaining.split(): |
| 269 | assert f'Constructing wrapper function "{rkey}"' in out |
| 270 | |
| 271 | |
| 272 | def test_f2py_only(capfd, retreal_f77, monkeypatch): |
nothing calls this directly
no test coverage detected