fix two cases where a float was being written into due

This commit is contained in:
Damien Elmes 2020-03-26 19:05:18 +10:00
parent 47504245dc
commit 13c7c82ae3
2 changed files with 2 additions and 2 deletions

View File

@ -341,7 +341,7 @@ limit %d"""
resched = self._resched(card)
if "mult" in conf and resched:
# review that's lapsed
card.ivl = max(1, conf["minInt"], card.ivl * conf["mult"])
card.ivl = max(1, conf["minInt"], int(card.ivl * conf["mult"]))
else:
# new card; no ivl adjustment
pass

View File

@ -968,7 +968,7 @@ def test_timing():
c2 = d.sched.getCard()
assert c2.queue == QUEUE_TYPE_REV
# if the failed card becomes due, it should show first
c.due = time.time() - 1
c.due = intTime() - 1
c.flush()
d.reset()
c = d.sched.getCard()