Skip to content

Commit 8fa7848

Browse files
committed
Fix doctest for sphinx
1 parent c82a963 commit 8fa7848

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

windpowerlib/wind_turbine.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,15 @@ def to_group(self, number_turbines=None, total_capacity=None):
237237
3.5
238238
>>> e126.to_group(total_capacity=12600000).wind_turbine.nominal_power
239239
4200000.0
240-
>>> e126.to_group(5)
241-
WindTurbineGroup(wind_turbine=Wind turbine: E-126/4200 ['nominal\
242-
power=4200000.0 W', 'hub height=135 m', 'rotor diameter=127.0 m',\
243-
'power_coefficient_curve=True', 'power_curve=True'], number_of_turbines=5)
240+
>>> type(e126.to_group(5))
241+
<class 'windpowerlib.wind_turbine.WindTurbineGroup'>
242+
>>> e126.to_group(5) # doctest: +NORMALIZE_WHITESPACE
243+
WindTurbineGroup(wind_turbine=Wind turbine: E-126/4200 ['nominal
244+
power=4200000.0 W', 'hub height=135 m', 'rotor diameter=127.0 m',
245+
'power_coefficient_curve=True', 'power_curve=True'],
246+
number_of_turbines=5)
244247
"""
248+
245249
if number_turbines is not None and total_capacity is not None:
246250
raise ValueError("The 'number' and the 'total_capacity parameter "
247251
"are mutually exclusive. Use just one of them.")

0 commit comments

Comments
 (0)