|
8 | 8 | # ' |
9 | 9 | # ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
10 | 10 |
|
| 11 | +import logging |
| 12 | + |
11 | 13 | from geoh5py.groups import SimPEGGroup |
12 | 14 | from geoh5py.ui_json import InputFile |
13 | 15 |
|
|
33 | 35 |
|
34 | 36 |
|
35 | 37 | # pylint: disable=too-many-statements |
36 | | -def test_plate_simulation_params_from_input_file(tmp_path): |
| 38 | +def test_plate_simulation_params_from_input_file(tmp_path, caplog): |
37 | 39 | opts = SyntheticsComponentsOptions( |
38 | 40 | method="gravity", |
39 | 41 | survey=SurveyOptions(n_stations=8, n_lines=8), |
@@ -87,7 +89,9 @@ def test_plate_simulation_params_from_input_file(tmp_path): |
87 | 89 | ifile.data["spacing"] = 10.0 |
88 | 90 | ifile.data["elevation"] = 20 |
89 | 91 |
|
90 | | - params = PlateSimulationOptions.build(ifile) |
| 92 | + with caplog.at_level(logging.WARNING): |
| 93 | + params = PlateSimulationOptions.build(ifile) |
| 94 | + assert "Overburden thickness exceeds the plate depth" in caplog.text |
91 | 95 | assert isinstance(params.simulation, SimPEGGroup) |
92 | 96 |
|
93 | 97 | simulation_parameters = params.simulation_parameters() |
@@ -124,4 +128,5 @@ def test_plate_simulation_params_from_input_file(tmp_path): |
124 | 128 |
|
125 | 129 | assert params.model.plate_options.number == 9 |
126 | 130 | assert params.model.plate_options.spacing == 10.0 |
127 | | - assert params.model.plate_options.geometry.elevation == 20.0 |
| 131 | + # reset by validator |
| 132 | + assert params.model.plate_options.geometry.elevation == 50.0 |
0 commit comments