Skip to content

Commit 5a610ce

Browse files
committed
Add basic example test
1 parent ac6069b commit 5a610ce

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

example/test_examples.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
from numpy.testing import assert_allclose
88

99

10-
# class TestExamples:
11-
#
12-
# def test_basic_example_flh(self):
13-
# # tests full load hours
14-
# weather = be.get_weather_data('weather.csv')
15-
# my_turbine, e126 = be.initialise_wind_turbines()
16-
# be.calculate_power_output(weather, my_turbine, e126)
17-
#
18-
# assert_allclose(1766.6870, (e126.power_output.sum() /
19-
# e126.nominal_power), 0.01)
20-
# assert_allclose(1882.7567, (my_turbine.power_output.sum() /
21-
# my_turbine.nominal_power), 0.01)
10+
class TestExamples:
11+
12+
def test_basic_example_flh(self):
13+
# tests full load hours
14+
weather = be.get_weather_data('weather.csv')
15+
my_turbine, e126 = be.initialise_wind_turbines()
16+
be.calculate_power_output(weather, my_turbine, e126)
17+
18+
assert_allclose(1766.6870, (e126.power_output.sum() /
19+
e126.nominal_power), 0.01)
20+
assert_allclose(1882.7567, (my_turbine.power_output.sum() /
21+
my_turbine.nominal_power), 0.01)
2222
#
2323
# def _notebook_run(self, path):
2424
# """

0 commit comments

Comments
 (0)