Skip to content

Commit

Permalink
tests: Fix conftest (was skipping MPI tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Dec 5, 2018
1 parent 2e41933 commit e7be242
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def skipif(items):
if unknown:
raise ValueError("Illegal skipif argument(s) `%s`" % unknown)
for i in items:
# Skip if no MPI
if i == 'nompi':
if MPI is None:
return pytest.mark.skipif(True, reason="mpi4py/MPI not installed")
continue
# Skip if an unsupported backend
if i == configuration['backend']:
return pytest.mark.skipif(True, reason="`%s` backend unsupported" % i)
Expand All @@ -40,9 +45,6 @@ def skipif(items):
return pytest.mark.skipif(True, reason="`%s` backend unsupported" % i)
except ValueError:
pass
# Skip if no MPI
if i == 'nompi' and MPI is None:
return pytest.mark.skipif(True, reason="mpi4py/MPI not installed")
return pytest.mark.skipif(False, reason="")


Expand Down

0 comments on commit e7be242

Please sign in to comment.