Skip to content

Commit fa32717

Browse files
committed
Fix test for missing cp- or p-values
1 parent b84f19e commit fa32717

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests/test_modelchain.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,15 @@ def test_run_model(self):
177177
test_mc.run_model(weather, data_height)
178178
# Raise TypeErrors due to missing cp- or p-values
179179
with pytest.raises(TypeError):
180-
test_modelchain['power_output_model'] = 'p_values'
181-
test_turbine['fetch_curve'] = 'cp'
182-
test_mc = mc.ModelChain(wt.WindTurbine(**test_turbine),
183-
**test_modelchain)
184-
test_mc.run_model(weather, data_height)
180+
turbine1 = {'hub_height': 100,
181+
'd_rotor': 80,
182+
'turbine_name': 'ENERCON E 126 7500',
183+
'fetch_curve': 'p'}
184+
modelchain1 = {'wind_model': 'hellman',
185+
'rho_model': 'barometric',
186+
'temperature_model': 'interpolation',
187+
'power_output_model': 'cp_values',
188+
'density_corr': True}
189+
test_mc = mc.ModelChain(wt.WindTurbine(**turbine1),
190+
**modelchain1)
191+
test_mc.run_model(weather, data_height)

0 commit comments

Comments
 (0)