File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 33import pytest
44from pandas .util .testing import assert_series_equal
55
6- from windpowerlib .wake_losses import reduce_wind_speed
7- import windpowerlib .wind_turbine as wt
6+ from windpowerlib .wake_losses import (reduce_wind_speed ,
7+ get_wind_efficiency_curve )
8+
89
910class TestWakeLosses :
1011
@@ -30,3 +31,16 @@ def test_reduce_wind_speed(self):
3031 with pytest .raises (ValueError ):
3132 parameters ['wind_efficiency_curve_name' ] = 'dena_misspelled'
3233 reduce_wind_speed (** parameters )
34+
35+ def test_get_wind_efficiency_curve_one (self ):
36+ """Test get_wind_efficiency_curve() for one curve."""
37+ wec = get_wind_efficiency_curve ().sum ()
38+ wec_exp = pd .Series ({'efficiency' : 162.45047 ,
39+ 'wind_speed' : 1915.23620 })
40+ assert_series_equal (wec .sort_index (), wec_exp .sort_index ())
41+
42+ def test_get_wind_efficiency_curve_all (self ):
43+ """Test get_wind_efficiency_curve() for all curves."""
44+ wec_all_sum = int (get_wind_efficiency_curve ('all' ).sum ().round ().sum ())
45+ print (wec_all_sum )
46+ assert wec_all_sum == 12145
You can’t perform that action at this time.
0 commit comments