Skip to content

Commit 081ad2d

Browse files
committed
Add test for wrong type of parameter density_corr
1 parent 533bb08 commit 081ad2d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_modelchain.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ def test_run_model(self):
175175
test_mc = mc.ModelChain(wt.WindTurbine(**test_turbine),
176176
**test_modelchain)
177177
test_mc.run_model(weather, data_height)
178+
with pytest.raises(TypeError):
179+
test_modelchain['power_output_model'] = 'cp_values'
180+
test_modelchain['density_corr'] = 'wrong_type'
181+
test_mc = mc.ModelChain(wt.WindTurbine(**test_turbine),
182+
**test_modelchain)
183+
test_mc.run_model(weather, data_height)
184+
178185
# Raise TypeErrors due to missing cp- or p-values
179186
with pytest.raises(TypeError):
180187
turbine1 = {'hub_height': 100,

0 commit comments

Comments
 (0)