@@ -171,22 +171,22 @@ def _get_result() -> GeophiresXResult:
171171 from_file_path = self ._get_test_file_path ('generic-egs-case.txt' ),
172172 params = {
173173 'Number of Segments' : 3 ,
174- 'Gradient 2' : '30 ' ,
175- 'Gradient 3' : '30 ' ,
176- 'Thicknesses' : '1.75 ,0.56 ,0.65 ' ,
174+ 'Gradient 2' : '40 ' ,
175+ 'Gradient 3' : '40 ' ,
176+ 'Thicknesses' : '2.5 ,0.49 ,0.87 ' ,
177177 },
178178 )
179179 )
180180
181181 r = _get_result ()
182-
183182 summary = r .result ['SUMMARY OF RESULTS' ]
183+
184184 expected = {
185185 'Segment 1 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 36.7 },
186- 'Segment 1 Thickness' : {'unit' : 'kilometer' , 'value' : 1.75 },
187- 'Segment 2 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 30 },
188- 'Segment 2 Thickness' : {'unit' : 'kilometer' , 'value' : 0.56 },
189- 'Segment 3 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 30 },
186+ 'Segment 1 Thickness' : {'unit' : 'kilometer' , 'value' : 2.5 },
187+ 'Segment 2 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 40 },
188+ 'Segment 2 Thickness' : {'unit' : 'kilometer' , 'value' : 0.49 },
189+ 'Segment 3 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 40 },
190190 'Segment 3 Thickness' : None ,
191191 'Segment 4 Geothermal gradient' : None ,
192192 }
@@ -195,25 +195,36 @@ def _get_result() -> GeophiresXResult:
195195 self .assertEqual (summary [k ], v )
196196
197197 def test_number_of_segments (self ):
198- """FIXME WIP"""
199-
200198 def _get_result () -> GeophiresXResult :
201199 return GeophiresXClient ().get_geophires_result (
202200 GeophiresInputParameters (
203201 from_file_path = self ._get_test_file_path ('generic-egs-case.txt' ),
204202 params = {
205203 'Number of Segments' : 3 ,
206- 'Gradient 2' : '30 ' ,
207- 'Gradient 3' : '30 ' ,
208- 'Gradient 4' : '30 ' ,
209- 'Thickness 1' : '1.75 ' ,
210- 'Thickness 2' : '0.56 ' ,
211- 'Thicknesses' : '1.75 ,0.56 ,0.65 ' ,
204+ 'Gradient 2' : '40 ' ,
205+ 'Gradient 3' : '40 ' ,
206+ 'Gradient 4' : '40 ' ,
207+ 'Thickness 1' : '2.5 ' ,
208+ 'Thickness 2' : '0.49 ' ,
209+ 'Thicknesses' : '2.5 ,0.49 ,0.87 ' ,
212210 'Thickness 3' : '0.65' ,
213211 'Thickness 4' : '0.85' ,
214212 },
215213 )
216214 )
217215
218216 r = _get_result ()
219- self .assertIsNotNone (r ) # FIXME WIP
217+ summary = r .result ['SUMMARY OF RESULTS' ]
218+
219+ expected = {
220+ 'Segment 1 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 36.7 },
221+ 'Segment 1 Thickness' : {'unit' : 'kilometer' , 'value' : 2.5 },
222+ 'Segment 2 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 40 },
223+ 'Segment 2 Thickness' : {'unit' : 'kilometer' , 'value' : 0.49 },
224+ 'Segment 3 Geothermal gradient' : {'unit' : 'degC/km' , 'value' : 40 },
225+ 'Segment 3 Thickness' : None ,
226+ 'Segment 4 Geothermal gradient' : None ,
227+ }
228+
229+ for k , v in expected .items ():
230+ self .assertEqual (summary [k ], v )
0 commit comments