Skip to content

Commit

Permalink
Add assertion for timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiche committed Aug 7, 2024
1 parent ecac915 commit b35cd87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ def test_mixed_timezones_to_datetime_fails(self):
series = pd.Series(self.date_strings)
series = series.map(pd.Timestamp)
converted = pd.to_datetime(series)
self.assertIsNotNone(converted[0].tz)

def test_mixed_timezones_to_datetime(self):
series = pd.Series(self.date_strings)
series = series.map(pd.Timestamp)
converted = pd.to_datetime(series, utc=True)
self.assertIsNotNone(converted[0].tz)
i = 0
for dt in converted:
dt: datetime
Expand Down

0 comments on commit b35cd87

Please sign in to comment.