mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
fix unit tests
This commit is contained in:
parent
d1deeb2b37
commit
434b5442fd
1 changed files with 5 additions and 2 deletions
|
@ -293,7 +293,10 @@ def test_nextIvl():
|
|||
c.queue = 2
|
||||
c.ivl = 100
|
||||
c.factor = 2500
|
||||
# failing it puts it at tomorrow
|
||||
# failing it should put it at 30s
|
||||
assert ni(c, 1) == 30
|
||||
# or 1 day if relearn is false
|
||||
d.sched._cardConf(c)['lapse']['relearn']=False
|
||||
assert ni(c, 1) == 1*86400
|
||||
# (* 100 1.2 86400)10368000.0
|
||||
assert ni(c, 2) == 10368000
|
||||
|
@ -747,7 +750,7 @@ def test_resched():
|
|||
d.sched.reschedCards([c.id], 0, 0)
|
||||
c.load()
|
||||
assert c.due == d.sched.today
|
||||
assert c.ivl == 0
|
||||
assert c.ivl == 1
|
||||
assert c.queue == c.type == 2
|
||||
d.sched.reschedCards([c.id], 1, 1)
|
||||
c.load()
|
||||
|
|
Loading…
Reference in a new issue