Skip to content

Commit

Permalink
Update test_datetimes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kingbuzzman authored Apr 16, 2024
1 parent 40326ca commit 673adf0
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions tests/test_datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,28 +167,13 @@ def test_manual_increment():
with freeze_time(initial_datetime) as frozen_datetime:
assert frozen_datetime() == initial_datetime

frozen_datetime.tick()
initial_datetime += datetime.timedelta(seconds=1)
assert frozen_datetime() == initial_datetime

frozen_datetime.tick(delta=datetime.timedelta(seconds=10))
initial_datetime += datetime.timedelta(seconds=10)
assert frozen_datetime() == initial_datetime


def test_manual_increment_seconds():
initial_datetime = datetime.datetime(year=1, month=7, day=12,
hour=15, minute=6, second=3)
with freeze_time(initial_datetime) as frozen_datetime:
assert frozen_datetime() == initial_datetime
expected = initial_datetime + datetime.timedelta(seconds=1)
assert frozen_datetime.tick() == expected
assert frozen_datetime() == expected

frozen_datetime.tick()
initial_datetime += datetime.timedelta(seconds=1)
assert frozen_datetime() == initial_datetime

frozen_datetime.tick(10)
initial_datetime += datetime.timedelta(seconds=10)
assert frozen_datetime() == initial_datetime
expected = initial_datetime + datetime.timedelta(seconds=10)
assert frozen_datetime.tick(delta=datetime.timedelta(seconds=10)) == expected
assert frozen_datetime() == expected


def test_move_to():
Expand Down

0 comments on commit 673adf0

Please sign in to comment.