Skip to content

Commit

Permalink
pin test time, make positive rollover test moon and year as well
Browse files Browse the repository at this point in the history
  • Loading branch information
harbingerftw committed Sep 10, 2024
1 parent d0d7561 commit e11a44a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,19 @@ def test_time_operator(self):

def test_positive_rollover(self):
et = EorzeaTime()
et.sun = 1
et.bell = 23
et.minute = 59
et.bell = 23
et.sun = 32
et.moon = 12
et.year = 999

et.minute += 1

assert et.minute == 0
assert et.bell == 0
assert et.sun == 2
assert et.moon == 2
assert et.sun == 1
assert et.moon == 1
assert et.year == 1000

et.minute += 121

Expand All @@ -81,21 +84,22 @@ def test_positive_rollover(self):
et.bell += 49

assert et.bell == 3
assert et.sun == 4
assert et.sun == 3

def test_negative_rollover(self):
et = EorzeaTime()
et.sun = 1
et.bell = 0
et.minute = 0
et.bell = 0
et.sun = 1
et.moon = 2
et.year = 1000

et.minute -= 1

assert et.minute == 59
assert et.bell == 23
assert et.sun == 32
assert et.moon == 1
assert et.year == 1070

et.minute -= 119

Expand All @@ -112,7 +116,7 @@ def test_negative_rollover(self):
et.moon -= 11

assert et.moon == 2
assert et.year == 1069
assert et.year == 999

def test_property(self):
ts = 12700000
Expand Down

0 comments on commit e11a44a

Please sign in to comment.