Skip to content

Commit 93a432f

Browse files
authored
Appease a few test warnings (#1645)
* appease a few test warnings * missed a bunch of these first time around
1 parent b11c9e2 commit 93a432f

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

.github/workflows/pytest-remote-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Upload coverage to Codecov
106106
if: matrix.python-version == 3.7 && matrix.suffix == ''
107-
uses: codecov/codecov-action@v2
107+
uses: codecov/codecov-action@v3
108108
with:
109109
fail_ci_if_error: true
110110
verbose: true

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
8383
- name: Upload coverage to Codecov
8484
if: matrix.python-version == 3.7 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
85-
uses: codecov/codecov-action@v2
85+
uses: codecov/codecov-action@v3
8686
with:
8787
fail_ci_if_error: true
8888
verbose: true

pvlib/tests/test_atmosphere.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def test_kasten96_lt():
169169
)
170170
lt = atmosphere.kasten96_lt(*np.meshgrid(amp, pwat, aod_bb))
171171
assert np.allclose(lt, lt_expected, 1e-3)
172-
return lt
173172

174173

175174
def test_angstrom_aod():

pvlib/tests/test_clearsky.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,4 +808,3 @@ def test_bird():
808808
[Eb3, Ebh3, Gh3, Dh3],
809809
testdata2[['Direct Beam', 'Direct Hz', 'Global Hz', 'Dif Hz']].iloc[11],
810810
rtol=1e-3)
811-
return pd.DataFrame({'Eb': Eb, 'Ebh': Ebh, 'Gh': Gh, 'Dh': Dh}, index=times)

pvlib/tests/test_solarposition.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_sun_rise_set_transit_spa(expected_rise_set_spa, golden):
163163
result_rounded = pd.DataFrame(index=result.index)
164164
# need to iterate because to_datetime does not accept 2D data
165165
# the rounding fails on pandas < 0.17
166-
for col, data in result.iteritems():
166+
for col, data in result.items():
167167
result_rounded[col] = data.dt.round('1s')
168168

169169
assert_frame_equal(frame, result_rounded)
@@ -176,7 +176,7 @@ def test_sun_rise_set_transit_spa(expected_rise_set_spa, golden):
176176
# round to nearest minute
177177
result_rounded = pd.DataFrame(index=result.index)
178178
# need to iterate because to_datetime does not accept 2D data
179-
for col, data in result.iteritems():
179+
for col, data in result.items():
180180
result_rounded[col] = data.dt.round('s').tz_convert('MST')
181181

182182
assert_frame_equal(expected_rise_set_spa, result_rounded)
@@ -191,7 +191,7 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
191191
temperature=11, horizon='-0:34')
192192
# round to nearest minute
193193
result_rounded = pd.DataFrame(index=result.index)
194-
for col, data in result.iteritems():
194+
for col, data in result.items():
195195
result_rounded[col] = data.dt.round('min').tz_convert('MST')
196196
assert_frame_equal(expected_rise_set_ephem, result_rounded)
197197

@@ -227,7 +227,7 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
227227
horizon='-0:34')
228228
# round to nearest minute
229229
result_rounded = pd.DataFrame(index=result.index)
230-
for col, data in result.iteritems():
230+
for col, data in result.items():
231231
result_rounded[col] = data.dt.round('min').tz_convert('MST')
232232
assert_frame_equal(expected, result_rounded)
233233

@@ -259,22 +259,22 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
259259
altitude=golden.altitude, pressure=0, temperature=11, horizon='-0:34')
260260
# round to nearest minute
261261
result_rounded = pd.DataFrame(index=result.index)
262-
for col, data in result.iteritems():
262+
for col, data in result.items():
263263
result_rounded[col] = data.dt.round('min').tz_convert('MST')
264264
assert_frame_equal(expected, result_rounded)
265265

266266
# test with different timezone
267267
times = times.tz_convert('UTC')
268268
expected = expected.tz_convert('UTC') # resuse result from previous
269-
for col, data in expected.iteritems():
269+
for col, data in expected.items():
270270
expected[col] = data.dt.tz_convert('UTC')
271271
result = solarposition.sun_rise_set_transit_ephem(
272272
times,
273273
golden.latitude, golden.longitude, next_or_previous='previous',
274274
altitude=golden.altitude, pressure=0, temperature=11, horizon='-0:34')
275275
# round to nearest minute
276276
result_rounded = pd.DataFrame(index=result.index)
277-
for col, data in result.iteritems():
277+
for col, data in result.items():
278278
result_rounded[col] = data.dt.round('min').tz_convert(times.tz)
279279
assert_frame_equal(expected, result_rounded)
280280

0 commit comments

Comments
 (0)