Buckets:
ktongue/docker_container / simsite /venv /lib /python3.14 /site-packages /numpy /tests /test_scripts.py
| """ Test scripts | |
| Test that we can run executable scripts that have been installed with numpy. | |
| """ | |
| import os | |
| import subprocess | |
| import sys | |
| from os.path import dirname, isfile, join as pathjoin | |
| import pytest | |
| import numpy as np | |
| from numpy.testing import IS_WASM, assert_equal | |
| is_inplace = isfile(pathjoin(dirname(np.__file__), '..', 'setup.py')) | |
| def find_f2py_commands(): | |
| if sys.platform == 'win32': | |
| exe_dir = dirname(sys.executable) | |
| if exe_dir.endswith('Scripts'): # virtualenv | |
| return [os.path.join(exe_dir, 'f2py')] | |
| else: | |
| return [os.path.join(exe_dir, "Scripts", 'f2py')] | |
| else: | |
| # Three scripts are installed in Unix-like systems: | |
| # 'f2py', 'f2py{major}', and 'f2py{major.minor}'. For example, | |
| # if installed with python3.9 the scripts would be named | |
| # 'f2py', 'f2py3', and 'f2py3.9'. | |
| version = sys.version_info | |
| major = str(version.major) | |
| minor = str(version.minor) | |
| return ['f2py', 'f2py' + major, 'f2py' + major + '.' + minor] | |
| def test_f2py(f2py_cmd): | |
| # test that we can run f2py script | |
| stdout = subprocess.check_output([f2py_cmd, '-v']) | |
| assert_equal(stdout.strip(), np.__version__.encode('ascii')) | |
| def test_pep338(): | |
| stdout = subprocess.check_output([sys.executable, '-mnumpy.f2py', '-v']) | |
| assert_equal(stdout.strip(), np.__version__.encode('ascii')) | |
Xet Storage Details
- Size:
- 1.65 kB
- Xet hash:
- 54dcc25ac2f7af742eaf2ca402635d8e2a22c7037ab40d9a8d3e4c991091581f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.