summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-09-21 21:07:25 -0500
committerGitHub <noreply@github.com>2018-09-21 21:07:25 -0500
commit25f06a6684b88b925748544f51955d3b0a6db423 (patch)
tree7f75eb94fe0391f75eb1e0271428d28b5a7f7968 /numpy/f2py/tests
parent8c10f59ebb51fc63b9f97c9a427dd44be4d1e843 (diff)
parent1b14317405a80dd3ecd55faf50dfde15b075a9c5 (diff)
downloadnumpy-25f06a6684b88b925748544f51955d3b0a6db423.tar.gz
Merge pull request #12014 from tylerjereddy/issue_12013_pytest_skip
TST: prefer pytest.skip() over SkipTest
Diffstat (limited to 'numpy/f2py/tests')
-rw-r--r--numpy/f2py/tests/test_array_from_pyobj.py5
-rw-r--r--numpy/f2py/tests/util.py10
2 files changed, 8 insertions, 7 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py
index 8b021491f..67a7f010c 100644
--- a/numpy/f2py/tests/test_array_from_pyobj.py
+++ b/numpy/f2py/tests/test_array_from_pyobj.py
@@ -4,11 +4,12 @@ import unittest
import os
import sys
import copy
+import pytest
from numpy import (
array, alltrue, ndarray, zeros, dtype, intp, clongdouble
)
-from numpy.testing import assert_, assert_equal, SkipTest
+from numpy.testing import assert_, assert_equal
from numpy.core.multiarray import typeinfo
from . import util
@@ -24,7 +25,7 @@ def setup_module():
# Check compiler availability first
if not util.has_c_compiler():
- raise SkipTest("No C compiler available")
+ pytest.skip("No C compiler available")
if wrap is None:
config_code = """
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py
index 466fd4970..73fc27b96 100644
--- a/numpy/f2py/tests/util.py
+++ b/numpy/f2py/tests/util.py
@@ -20,7 +20,7 @@ import pytest
import numpy.f2py
from numpy.compat import asbytes, asstr
-from numpy.testing import SkipTest, temppath
+from numpy.testing import temppath
from importlib import import_module
try:
@@ -322,14 +322,14 @@ class F2PyTest(object):
def setup(self):
if sys.platform == 'win32':
- raise SkipTest('Fails with MinGW64 Gfortran (Issue #9673)')
+ pytest.skip('Fails with MinGW64 Gfortran (Issue #9673)')
if self.module is not None:
return
# Check compiler availability first
if not has_c_compiler():
- raise SkipTest("No C compiler available")
+ pytest.skip("No C compiler available")
codes = []
if self.sources:
@@ -345,9 +345,9 @@ class F2PyTest(object):
elif fn.endswith('.f90'):
needs_f90 = True
if needs_f77 and not has_f77_compiler():
- raise SkipTest("No Fortran 77 compiler available")
+ pytest.skip("No Fortran 77 compiler available")
if needs_f90 and not has_f90_compiler():
- raise SkipTest("No Fortran 90 compiler available")
+ pytest.skip("No Fortran 90 compiler available")
# Build the module
if self.code is not None: