hack around race condition triggered in tests on win32
This commit is contained in:
parent
2280a0e58a
commit
252f74b19c
@ -1,8 +1,9 @@
|
||||
# coding: utf-8
|
||||
import time
|
||||
|
||||
from tests.shared import getEmptyCol
|
||||
from anki.consts import MODEL_CLOZE
|
||||
from anki.utils import stripHTML, joinFields
|
||||
from anki.utils import stripHTML, joinFields, isWin
|
||||
import anki.template
|
||||
|
||||
def test_modelDelete():
|
||||
@ -267,6 +268,9 @@ def test_modelChange():
|
||||
assert f.cards()[0].id == c1.id
|
||||
# delete first card
|
||||
map = {0: None, 1: 1}
|
||||
if isWin:
|
||||
# The low precision timer on Windows reveals a race condition
|
||||
time.sleep(0.05)
|
||||
deck.models.change(basic, [f.id], basic, None, map)
|
||||
f.load()
|
||||
c0.load()
|
||||
|
Loading…
Reference in New Issue
Block a user