Skip to content

Commit

Permalink
add recognizable numbers in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Jan 12, 2025
1 parent 6f423a7 commit 047681b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test_bot/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
def test_time_conversion() -> None:
"""Test conversion of time units."""
assert timer.msec(1000) == timedelta(milliseconds=1000)
assert timer.to_msec(timedelta(milliseconds=1000)) == 1000.0
assert timer.to_msec(timedelta(milliseconds=1000)) == 1000

assert timer.msec_str(timedelta(milliseconds=1000)) == "1000"

assert timer.seconds(1) == timedelta(seconds=1)
assert timer.to_seconds(timedelta(seconds=1)) == 1.0
assert timer.to_seconds(timedelta(seconds=1)) == 1

assert timer.sec_str(timedelta(seconds=1)) == "1"

Expand All @@ -22,11 +22,11 @@ def test_time_conversion() -> None:
assert timer.days(1) == timedelta(days=1)
assert timer.years(1) == timedelta(days=365)

assert timer.to_msec(timer.seconds(1)) == 1000.0
assert timer.to_seconds(timer.minutes(1)) == 60.0
assert timer.to_seconds(timer.hours(1)) == 3600.0
assert timer.to_seconds(timer.days(1)) == 86400.0
assert timer.to_seconds(timer.years(1)) == 31536000.0
assert timer.to_msec(timer.seconds(1)) == 1000
assert timer.to_seconds(timer.minutes(1)) == 60
assert timer.to_seconds(timer.hours(1)) == 60*60
assert timer.to_seconds(timer.days(1)) == 24*60*60
assert timer.to_seconds(timer.years(1)) == 365*24*60*60


def test_init() -> None:
Expand Down

0 comments on commit 047681b

Please sign in to comment.