Skip to content

Commit 16f889a

Browse files
committed
Fix test
1 parent 368b227 commit 16f889a

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
@@ -147,6 +148,7 @@ def test_magnetic_vector_run(
147148

148149
def test_magnetic_vector_bounds_run(
149150
tmp_path: Path,
151+
caplog,
150152
max_iterations=4,
151153
pytest=True,
152154
):
@@ -167,10 +169,7 @@ def test_magnetic_vector_bounds_run(
167169

168170
# Run the inverse
169171
active_cells = ActiveCellsOptions(topography_object=topography)
170-
with warns(
171-
DeprecationWarning,
172-
match="Parameter 'lower_bound' for Magnetic Vector Inversion",
173-
):
172+
with caplog.at_level(logging.WARNING):
174173
params = MVIInversionOptions(
175174
geoh5=geoh5,
176175
mesh=mesh,
@@ -198,6 +197,8 @@ def test_magnetic_vector_bounds_run(
198197
)
199198
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
200199

200+
assert "Skipping deprecated field: lower_bound" in caplog.text
201+
201202
driver = MVIInversionDriver(params)
202203
assert np.all(driver.models.lower_bound == -upper_bound)
203204

0 commit comments

Comments
 (0)