mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
use longer delay in test_timing()
was intermittently failing in slow Windows CI
This commit is contained in:
parent
d5d5ca9c3d
commit
44ca4b32eb
1 changed files with 4 additions and 4 deletions
|
@ -957,19 +957,19 @@ def test_timing():
|
||||||
# fail the first one
|
# fail the first one
|
||||||
d.reset()
|
d.reset()
|
||||||
c = d.sched.getCard()
|
c = d.sched.getCard()
|
||||||
# set a a fail delay of 1 second so we don't have to wait
|
# set a a fail delay of 4 seconds
|
||||||
conf = d.sched._cardConf(c)
|
conf = d.sched._cardConf(c)
|
||||||
conf["lapse"]["delays"][0] = 1 / 60.0
|
conf["lapse"]["delays"][0] = 1 / 15.0
|
||||||
d.decks.save(conf)
|
d.decks.save(conf)
|
||||||
d.sched.answerCard(c, 1)
|
d.sched.answerCard(c, 1)
|
||||||
# the next card should be another review
|
# the next card should be another review
|
||||||
c = d.sched.getCard()
|
c = d.sched.getCard()
|
||||||
assert c.queue == QUEUE_TYPE_REV
|
assert c.queue == QUEUE_TYPE_REV
|
||||||
# but if we wait for a second, the failed card should come back
|
# but if we wait for a few seconds, the failed card should come back
|
||||||
orig_time = time.time
|
orig_time = time.time
|
||||||
|
|
||||||
def adjusted_time():
|
def adjusted_time():
|
||||||
return orig_time() + 1
|
return orig_time() + 5
|
||||||
|
|
||||||
time.time = adjusted_time
|
time.time = adjusted_time
|
||||||
c = d.sched.getCard()
|
c = d.sched.getCard()
|
||||||
|
|
Loading…
Reference in a new issue