MCPcopy Index your code
hub / github.com/numpy/numpy / test_cli_obj

Function test_cli_obj

numpy/f2py/tests/test_f2py2e.py:698–714  ·  view source on GitHub ↗

Ensures that the extra object can be specified when using meson backend

(capfd, hello_world_f90, monkeypatch)

Source from the content-addressed store, hash-verified

696@pytest.mark.skipif((platform.system() != 'Linux'), reason='Compiler required')
697@pytest.mark.slow
698def test_cli_obj(capfd, hello_world_f90, monkeypatch):
699 """Ensures that the extra object can be specified when using meson backend
700 """
701 ipath = Path(hello_world_f90)
702 mname = "blah"
703 odir = "tttmp"
704 obj = "extra.o"
705 monkeypatch.setattr(sys, "argv",
706 f'f2py --backend meson --build-dir {odir} -m {mname} -c {obj} {ipath}'.split())
707
708 with util.switchdir(ipath.parent):
709 Path(obj).touch()
710 compiler_check_f2pycli()
711 with Path(f"{odir}/meson.build").open() as mesonbuild:
712 mbld = mesonbuild.read()
713 assert "objects:" in mbld
714 assert f"'''{obj}'''" in mbld
715
716
717def test_inclpath():

Callers

nothing calls this directly

Calls 4

compiler_check_f2pycliFunction · 0.85
splitMethod · 0.80
openMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…