mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00

- model config is now stored as a json-serialized dict, which allows us to quickly gather the info and allows for adding extra options more easily in the future - denormalize modelId into the cards table, so we can get the model scheduling information without having to hit the facts table - remove position - since we will handle spacing differently we don't need a separate variable to due to define sort order - remove lastInterval from cards; the new cram mode and review early shouldn't need it - successive->streak - add new columns for learn mode - move cram mode into new file; learn more and review early need more thought - initial work on learn mode - initial unit tests
15 lines
288 B
Python
15 lines
288 B
Python
import tempfile, os
|
|
from anki import Deck
|
|
|
|
def assertException(exception, func):
|
|
found = False
|
|
try:
|
|
func()
|
|
except exception:
|
|
found = True
|
|
assert found
|
|
|
|
def getDeck():
|
|
(fd, nam) = tempfile.mkstemp(suffix=".anki")
|
|
os.unlink(nam)
|
|
return Deck(nam)
|