We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1144106 commit 14715edCopy full SHA for 14715ed
pvlib/tests/test_tools.py
@@ -274,9 +274,11 @@ def test_normalize_max2one(data_in, expected):
274
def test_localize_to_utc(input, expected):
275
got = tools.localize_to_utc(**input)
276
277
- # Pandas has wonky dtype check in Python 3.9.
278
if isinstance(got, (pd.Series, pd.DataFrame)):
279
- pd.testing.assert_index_equal(got.index, expected.index)
+ # Older pandas versions have wonky dtype check on index.
+ for index_got, index_expected in zip(got.index, expected.index):
280
+ assert index_got == index_expected
281
+
282
np.testing.assert_array_equal(got.to_numpy(), expected.to_numpy())
283
else:
284
assert got == expected
0 commit comments