diff options
Diffstat (limited to 'numpy/distutils/tests')
| -rw-r--r-- | numpy/distutils/tests/test_build_ext.py | 2 | ||||
| -rw-r--r-- | numpy/distutils/tests/test_ccompiler_opt.py | 6 | ||||
| -rw-r--r-- | numpy/distutils/tests/test_exec_command.py | 5 | ||||
| -rw-r--r-- | numpy/distutils/tests/test_shell_utils.py | 3 | ||||
| -rw-r--r-- | numpy/distutils/tests/test_system_info.py | 4 |
5 files changed, 14 insertions, 6 deletions
diff --git a/numpy/distutils/tests/test_build_ext.py b/numpy/distutils/tests/test_build_ext.py index c007159f5..372100fc0 100644 --- a/numpy/distutils/tests/test_build_ext.py +++ b/numpy/distutils/tests/test_build_ext.py @@ -5,7 +5,9 @@ import subprocess import sys from textwrap import indent, dedent import pytest +from numpy.testing import IS_WASM +@pytest.mark.skipif(IS_WASM, reason="cannot start subprocess in wasm") @pytest.mark.slow def test_multi_fortran_libs_link(tmp_path): ''' diff --git a/numpy/distutils/tests/test_ccompiler_opt.py b/numpy/distutils/tests/test_ccompiler_opt.py index 657ebdb68..a1b780336 100644 --- a/numpy/distutils/tests/test_ccompiler_opt.py +++ b/numpy/distutils/tests/test_ccompiler_opt.py @@ -31,7 +31,7 @@ arch_compilers = dict( ppc64 = ("gcc", "clang"), ppc64le = ("gcc", "clang"), armhf = ("gcc", "clang"), - aarch64 = ("gcc", "clang"), + aarch64 = ("gcc", "clang", "fcc"), s390x = ("gcc", "clang"), noarch = ("gcc",) ) @@ -422,8 +422,8 @@ class _Test_CCompilerOpt: # when option "native" is activated through the args try: self.expect("native", - trap_flags=".*(-march=native|-xHost|/QxHost).*", - x86=".*", ppc64=".*", armhf=".*", s390x=".*" + trap_flags=".*(-march=native|-xHost|/QxHost|-mcpu=a64fx).*", + x86=".*", ppc64=".*", armhf=".*", s390x=".*", aarch64=".*", ) if self.march() != "unknown": raise AssertionError( diff --git a/numpy/distutils/tests/test_exec_command.py b/numpy/distutils/tests/test_exec_command.py index 157bd8427..d1a20056a 100644 --- a/numpy/distutils/tests/test_exec_command.py +++ b/numpy/distutils/tests/test_exec_command.py @@ -1,10 +1,12 @@ import os +import pytest import sys from tempfile import TemporaryFile from numpy.distutils import exec_command from numpy.distutils.exec_command import get_pythonexe -from numpy.testing import tempdir, assert_, assert_warns +from numpy.testing import tempdir, assert_, assert_warns, IS_WASM + # In python 3 stdout, stderr are text (unicode compliant) devices, so to # emulate them import StringIO from the io module. @@ -93,6 +95,7 @@ def test_exec_command_stderr(): exec_command.exec_command("cd '.'") +@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess") class TestExecCommand: def setup_method(self): self.pyexe = get_pythonexe() diff --git a/numpy/distutils/tests/test_shell_utils.py b/numpy/distutils/tests/test_shell_utils.py index 32bd283e5..696d38ddd 100644 --- a/numpy/distutils/tests/test_shell_utils.py +++ b/numpy/distutils/tests/test_shell_utils.py @@ -4,6 +4,7 @@ import json import sys from numpy.distutils import _shell_utils +from numpy.testing import IS_WASM argv_cases = [ [r'exe'], @@ -49,6 +50,7 @@ def runner(Parser): 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): """ @@ -64,6 +66,7 @@ def test_join_matches_subprocess(Parser, runner, argv): 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): """ diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py index eb7235e04..66304a5e5 100644 --- a/numpy/distutils/tests/test_system_info.py +++ b/numpy/distutils/tests/test_system_info.py @@ -271,7 +271,7 @@ class TestSystemInfoReading: # But if we copy the values to a '[mkl]' section the value # is correct - with open(cfg, 'r') as fid: + with open(cfg) as fid: mkl = fid.read().replace('[ALL]', '[mkl]', 1) with open(cfg, 'w') as fid: fid.write(mkl) @@ -279,7 +279,7 @@ class TestSystemInfoReading: assert info.get_lib_dirs() == lib_dirs # Also, the values will be taken from a section named '[DEFAULT]' - with open(cfg, 'r') as fid: + with open(cfg) as fid: dflt = fid.read().replace('[mkl]', '[DEFAULT]', 1) with open(cfg, 'w') as fid: fid.write(dflt) |
