Skip to content

Commit 627092a

Browse files
committed
test deprecationwarning
1 parent dc96311 commit 627092a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_modelchain.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from pvlib.pvsystem import PVSystem
99
from pvlib.location import Location
1010

11+
from pvlib._deprecation import pvlibDeprecationWarning
12+
1113
from .conftest import assert_series_equal, assert_frame_equal
1214
import pytest
1315

@@ -1786,9 +1788,9 @@ def test_invalid_models(model, sapm_dc_snl_ac_system, location):
17861788

17871789

17881790
def test_bad_get_orientation():
1789-
with pytest.raises(ValueError):
1790-
modelchain.get_orientation('bad value')
1791-
1791+
with pytest.warns(pvlibDeprecationWarning, match='will be removed soon'):
1792+
with pytest.raises(ValueError):
1793+
modelchain.get_orientation('bad value')
17921794

17931795
# tests for PVSystem with multiple Arrays
17941796
def test_with_sapm_pvsystem_arrays(sapm_dc_snl_ac_system_Array, location,

0 commit comments

Comments
 (0)