From 9c8f0ffc7d96d13f668d8ad83f094cb00d33d011 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Wed, 15 Oct 2025 03:31:04 +0800 Subject: [PATCH] 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. --- pylib/tests/shared.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylib/tests/shared.py b/pylib/tests/shared.py index 6b653cf17..b0029962a 100644 --- a/pylib/tests/shared.py +++ b/pylib/tests/shared.py @@ -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