Skip to content

Commit 5301eb9

Browse files
committed
add dirindex test
1 parent e1dd203 commit 5301eb9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pvlib/tests/test_irradiance.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,17 @@ def test_dirindex_min_cos_zenith_max_zenith():
11261126
assert_series_equal(out, expected)
11271127

11281128

1129+
@fail_on_pvlib_version("0.12")
1130+
def test_dirindex_dni_clearsky_deprecation():
1131+
ghi = pd.Series([0, 1], index=times)
1132+
ghi_clearsky = pd.Series([0, 1], index=times)
1133+
dni_clear = pd.Series([0, 5], index=times)
1134+
solar_zenith = pd.Series([90, 89.99], index=times)
1135+
with pytest.warns(pvlibDeprecationWarning, match='dni_clear'):
1136+
irradiance.dirindex(ghi, ghi_clearsky, dni_clear, solar_zenith,
1137+
times, min_cos_zenith=0)
1138+
1139+
11291140
def test_dni():
11301141
ghi = pd.Series([90, 100, 100, 100, 100])
11311142
dhi = pd.Series([100, 90, 50, 50, 50])

0 commit comments

Comments
 (0)