MCPcopy Create free account
hub / github.com/numpy/numpy / test_limited_api

Function test_limited_api

numpy/core/tests/test_limited_api.py:19–44  ·  view source on GitHub ↗

Test building a third-party C extension with the limited API.

(tmp_path)

Source from the content-addressed store, hash-verified

17 ),
18)
19def test_limited_api(tmp_path):
20 """Test building a third-party C extension with the limited API."""
21 # Based in part on test_cython from random.tests.test_extending
22
23 here = os.path.dirname(__file__)
24 ext_dir = os.path.join(here, "examples", "limited_api")
25
26 cytest = str(tmp_path / "limited_api")
27
28 shutil.copytree(ext_dir, cytest)
29 # build the examples and "install" them into a temporary directory
30
31 install_log = str(tmp_path / "tmp_install_log.txt")
32 subprocess.check_output(
33 [
34 sys.executable,
35 "setup.py",
36 "build",
37 "install",
38 "--prefix", str(tmp_path / "installdir"),
39 "--single-version-externally-managed",
40 "--record",
41 install_log,
42 ],
43 cwd=cytest,
44 )

Callers

nothing calls this directly

Calls 2

joinMethod · 0.45
check_outputMethod · 0.45

Tested by

no test coverage detected