CLI :: -c
(hello_world_f90, monkeypatch)
| 794 | |
| 795 | @pytest.mark.skip(reason="Consistently fails on CI; noisy so skip not xfail.") |
| 796 | def test_npdistop(hello_world_f90, monkeypatch): |
| 797 | """ |
| 798 | CLI :: -c |
| 799 | """ |
| 800 | ipath = Path(hello_world_f90) |
| 801 | monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} -c'.split()) |
| 802 | |
| 803 | with util.switchdir(ipath.parent): |
| 804 | f2pycli() |
| 805 | cmd_run = shlex.split(f"{sys.executable} -c \"import blah; blah.hi()\"") |
| 806 | rout = subprocess.run(cmd_run, capture_output=True, encoding='UTF-8') |
| 807 | eout = ' Hello World\n' |
| 808 | assert rout.stdout == eout |
| 809 | |
| 810 | |
| 811 | @pytest.mark.skipif((platform.system() != 'Linux') or sys.version_info <= (3, 12), |