Skip to content

Commit 2864237

Browse files
committed
test(datetime): the resulting datetime object is now timezone-aware
1 parent 1074c38 commit 2864237

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/python/test_pythonmonkey_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
import pythonmonkey as pm
33
import random
4-
from datetime import datetime, timedelta
4+
from datetime import datetime, timedelta, timezone
55
import math
66

77
def test_passes():
@@ -47,7 +47,7 @@ def test_eval_booleans():
4747
def test_eval_dates():
4848
MIN_YEAR = 1 # https://docs.python.org/3/library/datetime.html#datetime.MINYEAR
4949
MAX_YEAR = 2023
50-
start = datetime(MIN_YEAR, 1, 1, 00, 00, 00)
50+
start = datetime(MIN_YEAR, 1, 1, 00, 00, 00, tzinfo=timezone.utc)
5151
years = MAX_YEAR - MIN_YEAR + 1
5252
end = start + timedelta(days=365 * years)
5353
for _ in range(10):

0 commit comments

Comments
 (0)