Skip to content

Commit

Permalink
Let fenicsx test skip if mpi4py not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed May 5, 2023
1 parent faee8cb commit bffd683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/external/test_fenicsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import pytest
import numpy as np
from mpi4py import MPI
import bempp.api
from bempp.api.external.fenicsx import fenics_to_bempp_trace_data, FenicsOperator


def test_p1_trace(has_dolfinx):
"""Test the trace of a P1 DOLFINx function."""
try:
from mpi4py import MPI
from dolfinx.geometry import (
BoundingBoxTree,
create_midpoint_tree,
Expand Down Expand Up @@ -58,6 +58,7 @@ def test_fenics_operator(has_dolfinx):
raise ImportError("UFL is not installed")
pytest.skip("UFL must be installed to run this test")
try:
from mpi4py import MPI
from dolfinx.fem import FunctionSpace
from dolfinx.mesh import create_unit_cube
except ImportError:
Expand Down

0 comments on commit bffd683

Please sign in to comment.