@@ -281,26 +281,26 @@ def test_wrong_density_correction_type(self):
281281
282282 def test_missing_cp_values (self ):
283283 """Raise TypeErrors due to missing cp-values"""
284- with pytest . raises ( TypeError ):
285- self . test_turbine = { 'hub_height ' : 100 ,
286- 'rotor_diameter ' : 80 ,
287- 'turbine_type' : 'E-126/4200' ,
288- 'power_coefficient_curve' : False }
284+ test_turbine = { 'hub_height' : 100 ,
285+ 'rotor_diameter ' : 80 ,
286+ 'turbine_type ' : 'E-126/4201' }
287+ msg = "Power coefficient curve values of"
288+ with pytest . raises ( TypeError , match = msg ):
289289 test_modelchain = {'power_output_model' : 'power_coefficient_curve' ,
290290 'density_correction' : True }
291- test_mc = mc .ModelChain (wt .WindTurbine (** self . test_turbine ),
291+ test_mc = mc .ModelChain (wt .WindTurbine (** test_turbine ),
292292 ** test_modelchain )
293293 test_mc .run_model (self .weather_df )
294294
295295 def test_missing_p_values (self ):
296296 """Raise TypeErrors due to missing p-values"""
297- with pytest . raises ( TypeError ):
298- self . test_turbine = { 'hub_height ' : 100 ,
299- 'rotor_diameter ' : 80 ,
300- 'turbine_type' : 'E-126/4200' ,
301- 'power_curve' : False }
297+ test_turbine = { 'hub_height' : 100 ,
298+ 'rotor_diameter ' : 80 ,
299+ 'turbine_type ' : 'E-126/4205' }
300+ msg = "Power curve values of"
301+ with pytest . raises ( TypeError , match = msg ):
302302 test_modelchain = {'power_output_model' : 'power_curve' ,
303303 'density_corr' : True }
304- test_mc = mc .ModelChain (wt .WindTurbine (** self . test_turbine ),
304+ test_mc = mc .ModelChain (wt .WindTurbine (** test_turbine ),
305305 ** test_modelchain )
306306 test_mc .run_model (self .weather_df )
0 commit comments