Update the TimestampStrings zone info handling
time_zone is the string version of the time zone data time_zone_zi is the ZoneInfo object of above
This commit is contained in:
@@ -144,8 +144,8 @@ class TestTimestampStrings:
|
||||
ts = TimestampStrings(time_zone=custom_tz_obj)
|
||||
|
||||
# The time_zone should be the ZoneInfo object itself
|
||||
assert ts.time_zone is custom_tz_obj
|
||||
assert isinstance(ts.time_zone, ZoneInfo)
|
||||
assert ts.time_zone_zi is custom_tz_obj
|
||||
assert isinstance(ts.time_zone_zi, ZoneInfo)
|
||||
|
||||
def test_zoneinfo_object_vs_string_equivalence(self):
|
||||
"""Test that ZoneInfo object and string produce equivalent results"""
|
||||
@@ -167,7 +167,7 @@ class TestTimestampStrings:
|
||||
|
||||
# The time_zone attributes will be different types but represent the same timezone
|
||||
assert str(ts_string.time_zone) == 'Europe/Paris'
|
||||
assert isinstance(ts_zoneinfo.time_zone, ZoneInfo)
|
||||
assert isinstance(ts_zoneinfo.time_zone_zi, ZoneInfo)
|
||||
|
||||
def test_edge_case_midnight(self):
|
||||
"""Test timestamp formatting at midnight"""
|
||||
|
||||
Reference in New Issue
Block a user