Current Path: > > opt > cloudlinux > venv > lib > python3.11 > > site-packages > numpy > distutils > tests
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
__init__.py | File | 0 bytes | April 17 2025 13:10:58. | |
test_build_ext.py | File | 2769 bytes | April 17 2025 13:10:58. | |
test_ccompiler_opt.py | File | 28778 bytes | April 17 2025 13:10:58. | |
test_ccompiler_opt_conf.py | File | 6347 bytes | April 17 2025 13:10:58. | |
test_exec_command.py | File | 7395 bytes | April 17 2025 13:10:58. | |
test_fcompiler.py | File | 1277 bytes | April 17 2025 13:10:58. | |
test_fcompiler_gnu.py | File | 2136 bytes | April 17 2025 13:10:58. | |
test_fcompiler_intel.py | File | 1058 bytes | April 17 2025 13:10:58. | |
test_fcompiler_nagfor.py | File | 1102 bytes | April 17 2025 13:10:58. | |
test_from_template.py | File | 1103 bytes | April 17 2025 13:10:58. | |
test_log.py | File | 868 bytes | April 17 2025 13:10:58. | |
test_mingw32ccompiler.py | File | 1609 bytes | April 17 2025 13:10:58. | |
test_misc_util.py | File | 3218 bytes | April 17 2025 13:10:58. | |
test_npy_pkg_config.py | File | 2557 bytes | April 17 2025 13:10:58. | |
test_shell_utils.py | File | 2114 bytes | April 17 2025 13:10:58. | |
test_system_info.py | File | 10999 bytes | April 17 2025 13:10:58. |
import pytest import subprocess import json import sys from numpy.distutils import _shell_utils from numpy.testing import IS_WASM argv_cases = [ [r'exe'], [r'path/exe'], [r'path\exe'], [r'\\server\path\exe'], [r'path to/exe'], [r'path to\exe'], [r'exe', '--flag'], [r'path/exe', '--flag'], [r'path\exe', '--flag'], [r'path to/exe', '--flag'], [r'path to\exe', '--flag'], # flags containing literal quotes in their name [r'path to/exe', '--flag-"quoted"'], [r'path to\exe', '--flag-"quoted"'], [r'path to/exe', '"--flag-quoted"'], [r'path to\exe', '"--flag-quoted"'], ] @pytest.fixture(params=[ _shell_utils.WindowsParser, _shell_utils.PosixParser ]) def Parser(request): return request.param @pytest.fixture def runner(Parser): if Parser != _shell_utils.NativeParser: pytest.skip('Unable to run with non-native parser') if Parser == _shell_utils.WindowsParser: return lambda cmd: subprocess.check_output(cmd) elif Parser == _shell_utils.PosixParser: # posix has no non-shell string parsing return lambda cmd: subprocess.check_output(cmd, shell=True) else: raise NotImplementedError @pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess") @pytest.mark.parametrize('argv', argv_cases) def test_join_matches_subprocess(Parser, runner, argv): """ Test that join produces strings understood by subprocess """ # invoke python to return its arguments as json cmd = [ sys.executable, '-c', 'import json, sys; print(json.dumps(sys.argv[1:]))' ] joined = Parser.join(cmd + argv) json_out = runner(joined).decode() assert json.loads(json_out) == argv @pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess") @pytest.mark.parametrize('argv', argv_cases) def test_roundtrip(Parser, argv): """ Test that split is the inverse operation of join """ try: joined = Parser.join(argv) assert argv == Parser.split(joined) except NotImplementedError: pytest.skip("Not implemented")
SILENT KILLER Tool