Skip to content

Commit 1a5efed

Browse files
Add zoneinfo asserts in tests
1 parent 195efbc commit 1a5efed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pvlib/tests/test_location.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ def test_location_tz(tz, tz_expected):
5454
def test_location_tz_update():
5555
loc = Location(32.2, -111, -11)
5656
assert loc.tz == 'Etc/GMT+11'
57-
assert loc.pytz == pytz.timezone('Etc/GMT+11')
57+
assert loc.pytz == pytz.timezone('Etc/GMT+11') # Deprecated attribute.
58+
assert loc.zoneinfo == zoneinfo.ZoneInfo('Etc/GMT+11')
5859

59-
# Updating tz updates pytz.
60+
# Updating Location's tz updates read-only time-zone attributes.
6061
loc.tz = 7
6162
assert loc.tz == 'Etc/GMT-7'
62-
assert loc.pytz == pytz.timezone('Etc/GMT-7')
63+
assert loc.pytz == pytz.timezone('Etc/GMT-7') # Deprecated attribute.
64+
assert loc.zoneinfo == zoneinfo.ZoneInfo('Etc/GMT-7')
6365

6466

6567
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)