Skip to content

Commit 4653d9d

Browse files
committed
enhance tests to check error message
1 parent 10edc65 commit 4653d9d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_modelchain.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,9 +1785,11 @@ def test_invalid_models(model, sapm_dc_snl_ac_system, location):
17851785
ModelChain(sapm_dc_snl_ac_system, location, **kwargs)
17861786

17871787

1788-
def test_bad_get_orientation():
1789-
with pytest.raises(ValueError):
1790-
modelchain.get_orientation('bad value')
1788+
def test_get_orientation_invalid_strategy():
1789+
with pytest.raises(ValueError,
1790+
match='invalid orientation strategy. strategy must '
1791+
'be one of south_at_latitude_tilt, flat,'):
1792+
modelchain.get_orientation('invalid_strategy')
17911793

17921794

17931795
# tests for PVSystem with multiple Arrays

0 commit comments

Comments
 (0)