@@ -42,11 +42,29 @@ def test_get_turbine_types(self, capsys):
4242
4343 def test_wrong_url_load_turbine_data (self ):
4444 """Load turbine data from oedb."""
45-
4645 with pytest .raises (ConnectionError ,
4746 match = "Database connection not successful" ):
4847 load_turbine_data_from_oedb ('wrong_schema' )
4948
5049 @pytest .mark .filterwarnings ("ignore:The WindTurbine" )
5150 def test_string_representation_of_wind_turbine (self ):
5251 assert "Wind turbine: ['hub height=120 m'" in repr (WindTurbine (120 ))
52+
53+ def test_power_curve_is_of_wrong_type (self ):
54+ """Error raising due to wrong type of WindTurbine.power_curve."""
55+ test_turbine_data = {'hub_height' : 100 ,
56+ 'rotor_diameter' : 80 ,
57+ 'turbine_type' : 'test_type' ,
58+ 'power_curve' : 'string' }
59+ with pytest .raises (TypeError ):
60+ WindTurbine (** test_turbine_data )
61+
62+ def test_power_coefficient_curve_is_of_wrong_type (self ):
63+ """Error raising due to wrong type of
64+ WindTurbine.power_coefficient_curve."""
65+ test_turbine_data = {'hub_height' : 100 ,
66+ 'rotor_diameter' : 80 ,
67+ 'turbine_type' : 'test_type' ,
68+ 'power_coefficient_curve' : 'string' }
69+ with pytest .raises (TypeError ):
70+ WindTurbine (** test_turbine_data )
0 commit comments