mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
New collections now start with the v3 scheduler
This commit is contained in:
parent
f2fefbb052
commit
cdcd9bcce0
4 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,7 @@ from tests.shared import assertException, getEmptyCol
|
|||
|
||||
def test_basic():
|
||||
col = getEmptyCol()
|
||||
col.set_v3_scheduler(False)
|
||||
# we start with a standard col
|
||||
assert len(col.decks.all_names_and_ids()) == 1
|
||||
# it should have an id of 1
|
||||
|
|
|
@ -28,6 +28,8 @@ def getEmptyCol():
|
|||
col.upgrade_to_v2_scheduler()
|
||||
if is_2021():
|
||||
col.set_v3_scheduler(True)
|
||||
else:
|
||||
col.set_v3_scheduler(False)
|
||||
return col
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ def getEmptyCol():
|
|||
|
||||
def test_op():
|
||||
col = getEmptyCol()
|
||||
col.set_v3_scheduler(False)
|
||||
# should have no undo by default
|
||||
assert not col.undo_status().undo
|
||||
# let's adjust a study option
|
||||
|
@ -47,6 +48,7 @@ def test_op():
|
|||
|
||||
def test_review():
|
||||
col = getEmptyCol()
|
||||
col.set_v3_scheduler(False)
|
||||
col.conf["counts"] = COUNT_REMAINING
|
||||
note = col.newNote()
|
||||
note["Front"] = "one"
|
||||
|
|
|
@ -24,6 +24,7 @@ pub(crate) fn schema11_config_as_string(creation_offset: Option<i32>) -> String
|
|||
"dayLearnFirst": false,
|
||||
"schedVer": 2,
|
||||
"creationOffset": creation_offset,
|
||||
"sched2021": true,
|
||||
});
|
||||
serde_json::to_string(&obj).unwrap()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue