File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111from __future__ import annotations
1212
13+ import logging
1314from pathlib import Path
1415
1516import numpy as np
@@ -165,6 +166,7 @@ def test_magnetic_vector_run(
165166
166167def 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
You can’t perform that action at this time.
0 commit comments