10000 Replace pytz with standard library's zoneinfo by markcampanelli · Pull Request #2343 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Replace pytz with standard library's zoneinfo #2343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Try alternative pandas test fix
  • Loading branch information
markcampanelli committed Dec 23, 2024
commit 14715ed5ae884ea834e561286dcbca80517f53f2
6 changes: 4 additions & 2 deletions pvlib/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,11 @@ def test_normalize_max2one(data_in, expected):
def test_localize_to_utc(input, expected):
got = tools.localize_to_utc(**input)

# Pandas has wonky dtype check in Python 3.9.
if isinstance(got, (pd.Series, pd.DataFrame)):
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):
assert index_got == index_expected

np.testing.assert_array_equal(got.to_numpy(), expected.to_numpy())
else:
assert got == expected
Expand Down
Loading
0