@@ -1094,6 +1094,28 @@ def test_dirindex(times):
10941094 equal_nan = True )
10951095
10961096
1097+ def test_dirindex_ghi_clearsky_deprecation ():
1098+ with pytest .warns (pvlibDeprecationWarning , match = 'ghi_clear' ):
1099+ times = pd .DatetimeIndex (['2014-06-24T18-1200' ])
1100+ ghi = pd .Series ([1038.62 ], index = times )
1101+ ghi_clearsky = pd .Series (
1102+ np .array ([1042.48031487 ]),
1103+ index = times
1104+ )
1105+ dni_clearsky = pd .Series (
1106+ np .array ([939.95469881 ]),
1107+ index = times
1108+ )
1109+ zenith = pd .Series (
1110+ np .array ([10.56413562 ]),
1111+ index = times
1112+ )
1113+ pressure , tdew = 93193 , 10
1114+ irradiance .dirindex (
1115+ ghi = ghi , ghi_clearsky = ghi_clearsky , dni_clearsky = dni_clearsky ,
1116+ zenith = zenith , times = times , pressure = pressure , temp_dew = tdew )
1117+
1118+
10971119def test_dirindex_min_cos_zenith_max_zenith ():
10981120 # map out behavior under difficult conditions with various
10991121 # limiting kwargs settings
@@ -1235,7 +1257,7 @@ def test_clearsky_index():
12351257 assert_series_equal (out , expected )
12361258
12371259
1238- def test_clearsky_index_renaming ():
1260+ def test_clearsky_index_clearsky_ghi_deprecation ():
12391261 with pytest .warns (pvlibDeprecationWarning , match = 'ghi_clear' ):
12401262 ghi , clearsky_ghi = 200 , 300
12411263 irradiance .clearsky_index (ghi , clearsky_ghi = clearsky_ghi )
0 commit comments