mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
Disable FSRS by default in test helper function
Add Config import and disable FSRS in getEmptyCol() helper function. This ensures all tests using this helper function have FSRS disabled by default, maintaining compatibility with legacy scheduler tests.
This commit is contained in:
parent
9d2ab84052
commit
9c8f0ffc7d
1 changed files with 3 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import tempfile
|
|||
import time
|
||||
|
||||
from anki.collection import Collection as aopen
|
||||
from anki.config import Config
|
||||
|
||||
# Between 2-4AM, shift the time back so test assumptions hold.
|
||||
lt = time.localtime()
|
||||
|
|
@ -49,6 +50,8 @@ def getEmptyCol():
|
|||
(fd, path) = tempfile.mkstemp(suffix=".anki2")
|
||||
shutil.copy(_emptyCol, path)
|
||||
col = aopen(path)
|
||||
# Disable FSRS for legacy scheduler tests
|
||||
col.set_config_bool(Config.Bool.FSRS, False, undoable=False)
|
||||
return col
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue