Skip to content

Commit 99925bc

Browse files
finsbergjorgensd
andauthored
Update tests/test_legacy_readers.py
Co-authored-by: Jørgen Schartum Dokken <dokken@simula.no>
1 parent 5252420 commit 99925bc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/test_legacy_readers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,8 @@ def test_legacy_function(backend):
109109
f = ufl.conditional(ufl.gt(x[0], 0.5), x[1], 2 * x[0])
110110
L = ufl.inner(f, v) * ufl.dx
111111

112-
try:
113-
from dolfinx.fem.petsc import LinearProblem
114-
except ImportError:
115-
pytest.skip("dolfinx.fem.petsc.LinearProblem not available")
112+
if not dolfinx.has_petsc4py:
113+
pytest.skip("dolfinx not configured with PETSc4py")
116114

117115
uh = dolfinx.fem.Function(V)
118116
if "petsc_options_prefix" in inspect.signature(LinearProblem.__init__).parameters.keys():

0 commit comments

Comments
 (0)