Skip to content

Commit 6704d06

Browse files
Fix pandas equality tests for Python 3.9
1 parent 77c0f81 commit 6704d06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pvlib/tests/test_tools.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@ def test_normalize_max2one(data_in, expected):
273273
)
274274
def test_localize_to_utc(input, expected):
275275
got = tools.localize_to_utc(**input)
276-
if isinstance(got, (pd.Series, pd.DataFrame)):
277-
assert got.equals(expected)
276+
277+
if isinstance(got, pd.Series):
278+
pd.testing.assert_series_equal(got, expected)
279+
elif isinstance(got, pd.DataFrame):
280+
pd.testing.assert_frame_equal(got, expected)
278281
else:
279282
assert got == expected
280283

0 commit comments

Comments
 (0)