summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/util.py
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2018-09-21 13:56:16 -0700
committerTyler Reddy <tyler.je.reddy@gmail.com>2018-09-21 13:56:16 -0700
commitf531cfd97a99ac8b534fff479e3388888319a606 (patch)
tree3572ba8e8571d203b8dcb1c9e0f6501937223ea0 /numpy/f2py/tests/util.py
parent6f0a0fafdd0b315cb46fca553beaff769af6e0da (diff)
downloadnumpy-f531cfd97a99ac8b534fff479e3388888319a606.tar.gz
TST: prefer pytest.skip() over SkipTest
* replace most usage of SkipTest() with pytest.skip() * where possible, we avoid use of the standard library SkipTest because unittest skipping is routed through the pytest nose compatibility layer in that scenario, which can prevent an easy trace back to the test line where the skip occurred
Diffstat (limited to 'numpy/f2py/tests/util.py')
-rw-r--r--numpy/f2py/tests/util.py10
1 files changed, 5 insertions, 5 deletions
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: