Skip to content
Merged
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
set tzinfo for test to pass
  • Loading branch information
Andrene authored Jan 2, 2026
commit 1449803a91e5ba4f02268924ec5402d36c92e565
7 changes: 4 additions & 3 deletions test_replays/test_replays.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
from datetime import timezone
import json
from xml.dom import minidom

Expand Down Expand Up @@ -193,15 +194,15 @@ def test_datetimes(self):

# Played at 20 Feb 2011 22:44:48 UTC+2
replay = sc2reader.load_replay("test_replays/1.2.2.17811/1.SC2Replay")
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 20, 20, 44, 47))
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 20, 20, 44, 47, tzinfo=timezone.utc))

# Played at 21 Feb 2011 00:42:13 UTC+2
replay = sc2reader.load_replay("test_replays/1.2.2.17811/2.SC2Replay")
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 20, 22, 42, 12))
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 20, 22, 42, 12, tzinfo=timezone.utc))

# Played at 25 Feb 2011 16:36:28 UTC+2
replay = sc2reader.load_replay("test_replays/1.2.2.17811/3.SC2Replay")
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 25, 14, 36, 26))
self.assertEqual(replay.end_time, datetime.datetime(2011, 2, 25, 14, 36, 26, tzinfo=timezone.utc))

def test_hots_pids(self):
for replayfilename in [
Expand Down