summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/util.py
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2022-05-27 23:51:03 +0000
committerRohit Goswami <rog32@hi.is>2022-05-27 23:51:03 +0000
commit393741878fdc3a0b93fb615c306aa2fa90139833 (patch)
tree6cecac6ce4b5778993548e4a40502b57a3b916d2 /numpy/f2py/tests/util.py
parent4c3958b98913e6d77c751cd4556efbb27e43c446 (diff)
downloadnumpy-393741878fdc3a0b93fb615c306aa2fa90139833.tar.gz
MAINT: Skip F2PY tests without Fortran compilers
Diffstat (limited to 'numpy/f2py/tests/util.py')
-rw-r--r--numpy/f2py/tests/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py
index c115970f4..66e5505c6 100644
--- a/numpy/f2py/tests/util.py
+++ b/numpy/f2py/tests/util.py
@@ -344,6 +344,10 @@ class F2PyTest:
# Check compiler availability first
if not has_c_compiler():
pytest.skip("No C compiler available")
+ if not has_f77_compiler():
+ pytest.skip("No Fortran 77 compiler available")
+ if not has_f90_compiler():
+ pytest.skip("No Fortran 90 compiler available")
codes = []
if self.sources:
@@ -358,10 +362,6 @@ class F2PyTest:
needs_f77 = True
elif str(fn).endswith(".f90"):
needs_f90 = True
- if needs_f77 and not has_f77_compiler():
- pytest.skip("No Fortran 77 compiler available")
- if needs_f90 and not has_f90_compiler():
- pytest.skip("No Fortran 90 compiler available")
# Build the module
if self.code is not None: