Buckets:
ktongue/docker_container / simsite /venv /lib /python3.14 /site-packages /numpy /tests /test_configtool.py
| import importlib.metadata | |
| import os | |
| import pathlib | |
| import subprocess | |
| import pytest | |
| import numpy as np | |
| import numpy._core.include | |
| import numpy._core.lib.pkgconfig | |
| from numpy.testing import IS_EDITABLE, IS_INSTALLED, IS_WASM, NUMPY_ROOT | |
| INCLUDE_DIR = NUMPY_ROOT / '_core' / 'include' | |
| PKG_CONFIG_DIR = NUMPY_ROOT / '_core' / 'lib' / 'pkgconfig' | |
| class TestNumpyConfig: | |
| def check_numpyconfig(self, arg): | |
| p = subprocess.run(['numpy-config', arg], capture_output=True, text=True) | |
| p.check_returncode() | |
| return p.stdout.strip() | |
| def test_configtool_version(self): | |
| stdout = self.check_numpyconfig('--version') | |
| assert stdout == np.__version__ | |
| def test_configtool_cflags(self): | |
| stdout = self.check_numpyconfig('--cflags') | |
| assert f'-I{os.fspath(INCLUDE_DIR)}' in stdout | |
| def test_configtool_pkgconfigdir(self): | |
| stdout = self.check_numpyconfig('--pkgconfigdir') | |
| assert pathlib.Path(stdout) == PKG_CONFIG_DIR.resolve() | |
| def test_pkg_config_entrypoint(): | |
| (entrypoint,) = importlib.metadata.entry_points(group='pkg_config', name='numpy') | |
| assert entrypoint.value == numpy._core.lib.pkgconfig.__name__ | |
| def test_pkg_config_config_exists(): | |
| assert PKG_CONFIG_DIR.joinpath('numpy.pc').is_file() | |
Xet Storage Details
- Size:
- 1.81 kB
- Xet hash:
- 609fbc6504895ebb3b0d7022a207e6ea8913b993c361eedeb3c1e7da58bdfa25
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.