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
@@ -147,6 +148,7 @@ def test_magnetic_vector_run(
147148
148149def 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
You can’t perform that action at this time.
0 commit comments