Lowers cases by flag or when -h is present CLI :: --[no-]lower
(capfd, hello_world_f77, monkeypatch)
| 378 | |
| 379 | |
| 380 | def test_lower_cmod(capfd, hello_world_f77, monkeypatch): |
| 381 | """Lowers cases by flag or when -h is present |
| 382 | |
| 383 | CLI :: --[no-]lower |
| 384 | """ |
| 385 | foutl = get_io_paths(hello_world_f77, mname="test") |
| 386 | ipath = foutl.finp |
| 387 | capshi = re.compile(r"HI\(\)") |
| 388 | capslo = re.compile(r"hi\(\)") |
| 389 | # Case I: --lower is passed |
| 390 | monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m test --lower'.split()) |
| 391 | with util.switchdir(ipath.parent): |
| 392 | f2pycli() |
| 393 | out, _ = capfd.readouterr() |
| 394 | assert capslo.search(out) is not None |
| 395 | assert capshi.search(out) is None |
| 396 | # Case II: --no-lower is passed |
| 397 | monkeypatch.setattr(sys, "argv", |
| 398 | f'f2py {ipath} -m test --no-lower'.split()) |
| 399 | with util.switchdir(ipath.parent): |
| 400 | f2pycli() |
| 401 | out, _ = capfd.readouterr() |
| 402 | assert capslo.search(out) is None |
| 403 | assert capshi.search(out) is not None |
| 404 | |
| 405 | |
| 406 | def test_lower_sig(capfd, hello_world_f77, monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…