Skip to content

Commit 6eec766

Browse files
committed
Add missing import
1 parent 99925bc commit 6eec766

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_legacy_readers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def test_legacy_function(backend):
112112
if not dolfinx.has_petsc4py:
113113
pytest.skip("dolfinx not configured with PETSc4py")
114114

115+
from dolfinx.fem.petsc import LinearProblem
116+
115117
uh = dolfinx.fem.Function(V)
116118
if "petsc_options_prefix" in inspect.signature(LinearProblem.__init__).parameters.keys():
117119
extra_options = {"petsc_options_prefix": "legacy_test"}
@@ -141,6 +143,8 @@ def test_read_legacy_function_from_checkpoint(backend):
141143
if not path.exists():
142144
pytest.skip(f"{path} does not exist")
143145

146+
from dolfinx.fem.petsc import LinearProblem
147+
144148
mesh = read_mesh_from_legacy_h5(path, comm, "/Mesh/mesh", backend=backend)
145149

146150
V = dolfinx.fem.functionspace(mesh, ("DG", 2))

0 commit comments

Comments
 (0)