mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -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():
|
def test_basic():
|
||||||
col = getEmptyCol()
|
col = getEmptyCol()
|
||||||
|
col.set_v3_scheduler(False)
|
||||||
# we start with a standard col
|
# we start with a standard col
|
||||||
assert len(col.decks.all_names_and_ids()) == 1
|
assert len(col.decks.all_names_and_ids()) == 1
|
||||||
# it should have an id of 1
|
# it should have an id of 1
|
||||||
|
|
|
@ -28,6 +28,8 @@ def getEmptyCol():
|
||||||
col.upgrade_to_v2_scheduler()
|
col.upgrade_to_v2_scheduler()
|
||||||
if is_2021():
|
if is_2021():
|
||||||
col.set_v3_scheduler(True)
|
col.set_v3_scheduler(True)
|
||||||
|
else:
|
||||||
|
col.set_v3_scheduler(False)
|
||||||
return col
|
return col
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ def getEmptyCol():
|
||||||
|
|
||||||
def test_op():
|
def test_op():
|
||||||
col = getEmptyCol()
|
col = getEmptyCol()
|
||||||
|
col.set_v3_scheduler(False)
|
||||||
# should have no undo by default
|
# should have no undo by default
|
||||||
assert not col.undo_status().undo
|
assert not col.undo_status().undo
|
||||||
# let's adjust a study option
|
# let's adjust a study option
|
||||||
|
@ -47,6 +48,7 @@ def test_op():
|
||||||
|
|
||||||
def test_review():
|
def test_review():
|
||||||
col = getEmptyCol()
|
col = getEmptyCol()
|
||||||
|
col.set_v3_scheduler(False)
|
||||||
col.conf["counts"] = COUNT_REMAINING
|
col.conf["counts"] = COUNT_REMAINING
|
||||||
note = col.newNote()
|
note = col.newNote()
|
||||||
note["Front"] = "one"
|
note["Front"] = "one"
|
||||||
|
|
|
@ -24,6 +24,7 @@ pub(crate) fn schema11_config_as_string(creation_offset: Option<i32>) -> String
|
||||||
"dayLearnFirst": false,
|
"dayLearnFirst": false,
|
||||||
"schedVer": 2,
|
"schedVer": 2,
|
||||||
"creationOffset": creation_offset,
|
"creationOffset": creation_offset,
|
||||||
|
"sched2021": true,
|
||||||
});
|
});
|
||||||
serde_json::to_string(&obj).unwrap()
|
serde_json::to_string(&obj).unwrap()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue