From 2436841269115d54e3abe412792b531a567ec85d Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 16 Apr 2024 11:54:12 +0200 Subject: [PATCH] Update test_datetimes.py --- tests/test_datetimes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py index b6bd75a..17d1a05 100644 --- a/tests/test_datetimes.py +++ b/tests/test_datetimes.py @@ -163,7 +163,7 @@ def test_time_with_dst(): def test_manual_increment(): initial_datetime = datetime.datetime(year=1, month=7, day=12, - hour=15, minute=6, second=3) + hour=15, minute=6, second=3) with freeze_time(initial_datetime) as frozen_datetime: assert frozen_datetime() == initial_datetime @@ -171,7 +171,11 @@ def test_manual_increment(): assert frozen_datetime.tick() == expected assert frozen_datetime() == expected - expected = initial_datetime + datetime.timedelta(seconds=10) + expected = initial_datetime + datetime.timedelta(seconds=11) + assert frozen_datetime.tick(10) == expected + assert frozen_datetime() == expected + + expected = initial_datetime + datetime.timedelta(seconds=21) assert frozen_datetime.tick(delta=datetime.timedelta(seconds=10)) == expected assert frozen_datetime() == expected