CLI :: -c
(hello_world_f90, monkeypatch)
| 734 | |
| 735 | @pytest.mark.xfail(reason="Consistently fails on CI.") |
| 736 | def test_npdistop(hello_world_f90, monkeypatch): |
| 737 | """ |
| 738 | CLI :: -c |
| 739 | """ |
| 740 | ipath = Path(hello_world_f90) |
| 741 | monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} -c'.split()) |
| 742 | |
| 743 | with util.switchdir(ipath.parent): |
| 744 | f2pycli() |
| 745 | cmd_run = shlex.split("python -c \"import blah; blah.hi()\"") |
| 746 | rout = subprocess.run(cmd_run, capture_output=True, encoding='UTF-8') |
| 747 | eout = ' Hello World\n' |
| 748 | assert rout.stdout == eout |
| 749 | |
| 750 | |
| 751 | # Numpy distutils flags |