Skip to content

Commit a5a5ae8

Browse files
committed
adjust error message
1 parent 79f490f commit a5a5ae8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pvlib/pvarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def _infer_k_huld(cell_type, pdc0, k_version):
266266
0.000158, -0.000006)}
267267
else:
268268
raise ValueError(f'Invalid k_version={k_version}: must be either '
269-
'"2011" or "2025"')
269+
'"2011" or "2025" as a string')
270270
k = tuple([x*pdc0 for x in huld_params[cell_type.lower()]])
271271
return k
272272

tests/test_pvarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_huld_params():
9999
pvarray.huld(
100100
eff_irr, temp_mod, pdc0, cell_type='invalid', k_version='2011'
101101
)
102-
with pytest.raises(ValueError, match='Invalid k_version="2021"'):
102+
with pytest.raises(ValueError, match='Invalid k_version=2021'):
103103
pvarray.huld(
104104
eff_irr, temp_mod, pdc0, cell_type='csi', k_version='2021'
105105
)

0 commit comments

Comments
 (0)