Skip to content

Commit 5715864

Browse files
committed
Fix test
1 parent 5cb86fb commit 5715864

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/run_tests/driver_mvi_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from __future__ import annotations
1212

13+
import logging
1314
from pathlib import Path
1415

1516
import numpy as np
@@ -165,6 +166,7 @@ def test_magnetic_vector_run(
165166

166167
def test_magnetic_vector_bounds_run(
167168
tmp_path: Path,
169+
caplog,
168170
max_iterations=4,
169171
pytest=True,
170172
):
@@ -185,10 +187,7 @@ def test_magnetic_vector_bounds_run(
185187

186188
# Run the inverse
187189
active_cells = ActiveCellsOptions(topography_object=topography)
188-
with warns(
189-
DeprecationWarning,
190-
match="Parameter 'lower_bound' for Magnetic Vector Inversion",
191-
):
190+
with caplog.at_level(logging.WARNING):
192191
params = MVIInversionOptions(
193192
geoh5=geoh5,
194193
mesh=mesh,
@@ -216,6 +215,8 @@ def test_magnetic_vector_bounds_run(
216215
)
217216
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
218217

218+
assert "Skipping deprecated field: lower_bound" in caplog.text
219+
219220
driver = MVIInversionDriver(params)
220221
assert np.all(driver.models.lower_bound == -upper_bound)
221222

0 commit comments

Comments
 (0)