Commit graph

122 commits

Author SHA1 Message Date
Damien Elmes
c78685a59b time of day hack in tests was off by an hour 2019-12-27 08:43:25 +10:00
Damien Elmes
ef57fd004b isort tests; black/isort should notice changes to tests 2019-12-26 07:36:26 +10:00
Damien Elmes
f0fc30e124 don't write test data in ~ 2019-12-26 07:00:10 +10:00
Damien Elmes
a1af6e61ae format tests 2019-12-25 14:18:34 +10:00
Damien Elmes
4264fec1fb more tests fail close to 4am; automatically adjust the time instead 2019-12-25 14:08:04 +10:00
Damien Elmes
cae97c56fc disable test around daily cutoff time 2019-12-25 13:43:08 +10:00
Damien Elmes
84f589bc75 fix handling of typing cards 2019-12-25 13:01:19 +10:00
Damien Elmes
45f26ed255 convert nose decorators and helpers to nose2 2019-12-24 21:42:40 +10:00
Damien Elmes
37791b2d55 comment out updatereqs speed test 2019-12-24 19:57:55 +10:00
Damien Elmes
7b7bf0737e hack around race condition triggered in tests on win32 2019-12-24 19:57:55 +10:00
Damien Elmes
9a239fb9a0 remove unnecessary global from tests 2019-12-24 19:57:55 +10:00
Damien Elmes
a0590d9ed1 fix unit test on Windows 2019-12-24 19:57:54 +10:00
Damien Elmes
54f438c999 in single field case, both 'any' and 'all' are equivalent 2019-12-24 19:57:54 +10:00
Damien Elmes
9ebc14f0c3 add temporary benchmark for updateReqs 2019-12-24 10:23:21 +10:00
Damien Elmes
232e0eafcf Merge pull request #374 from agentydragon/mathjax-test
Fix bug in _removeFormattingFromMathjax
2019-12-23 07:43:16 +10:00
Michal Pokorný (Rai)
8cc0384659 Fix bug in _removeFormattingFromMathjax 2019-12-22 05:47:45 +01:00
Michal Pokorný (Rai)
63ef6cc277 Document newly found bug in _removeFormattingFromMathjax
Also adds some comments I wrote to help me understand what's going
on in the code.

I hope to fix this bug myself, but I think it might be beyond what
you can do with Python regexes and might require writing a proper
parser.

So, as step 1, I'm adding in a couple comments explaining that the
bug exists and how to reproduce it.
2019-12-22 05:22:18 +01:00
Damien Elmes
4fca31f2ba Merge pull request #365 from Arthur-Milchior/updateReqsFalseInTest
add some updateReqs=False in tests
2019-12-21 07:42:49 +10:00
Arthur Milchior
5c796ee021 add some updateReqs=False in tests 2019-12-20 13:25:30 -08:00
Damien Elmes
090f8d2953 disable unit test broken by revert 2019-12-20 10:16:17 +10:00
Damien Elmes
bcb469f3e4 Merge pull request #361 from Arthur-Milchior/testReqs
test req
2019-12-16 20:44:23 +10:00
Arthur Milchior
350f240ac9 test req 2019-12-15 22:58:12 -08:00
Damien Elmes
c840a561f9 fix unit tests 2019-12-09 13:00:15 +10:00
Damien Elmes
0a13c340d3 default to v2 scheduler on new installs, remove warning 2019-12-06 18:37:39 +10:00
Arthur Milchior
2472e151c0 correction 2019-11-27 08:10:37 +01:00
Arthur Milchior
d6b0f225a0 newField checks its input is a str
Indeed, it takes as input a name (str). For some reason in some test
it was given a model. This actually led to some strange failed test.
2019-11-25 00:15:20 +01:00
Damien Elmes
0ba06e2d6c Merge pull request #352 from Arthur-Milchior/correctCaseInRename
Ensure that even childless deck's name is considered independtly of the case
2019-11-14 09:25:34 +10:00
Arthur Milchior
a86e7fab79 Ensure flag:12 raises an alert 2019-11-13 17:41:48 +01:00
Arthur Milchior
422f52afbb test that if two decks differs only by case, they are renamed 2019-11-13 17:08:40 +01:00
Arthur Milchior
d5e176f521 Test: Renaming with different cases 2019-11-13 17:08:40 +01:00
Arthur Milchior
3ead848afd Test: rename over filtered deck 2019-11-13 16:32:45 +01:00
Damien Elmes
f7bbbfdbb1 fix negative due dates in filtered decks
https://anki.tenderapp.com/discussions/ankidesktop/35978-rebuilding-filtered-deck-on-experimental-v2-empties-deck-and-reschedules-to-the-year-1745

this means affected cards will not have the selected ordering applied,
but that seems preferable to the alternatives
2019-09-24 15:38:33 +10:00
Damien Elmes
5c5afb7391 and test to catch v2 relearning reset bug
https://anki.tenderapp.com/discussions/ankidesktop/34560-schedule-switching-bug
2019-06-14 09:15:38 +10:00
Damien Elmes
640f486964 add unit test for v2 lrn scheduling bug
https://anki.tenderapp.com/discussions/ankimobile/9714-deleting-custom-study-deck-skips-learning-step-time
2019-05-31 15:02:58 +10:00
Erez Volk
a2c6a5b27e Use jsonschema for add-on manifests 2019-04-24 23:42:49 +03:00
Damien Elmes
d118c5cc9f add option to strip html in export 2019-03-05 08:57:53 +10:00
Damien Elmes
6826bb7f32 fix importing unit test
dupes no longer incremented for updated notes
2018-11-18 15:27:37 +10:00
Damien Elmes
c7620478cf v2: limit learn delay fuzz to 5 minutes and sub-day 2018-07-28 13:56:56 +10:00
Damien Elmes
066adfd933 use scheduled ivl in lapse calculation
reverting to 2.0 behaviour

https://anki.tenderapp.com/discussions/effective-learning/1300-lapse-duration-not-being-honored-for-lapses-of-multi-stepday-relearn-cards
2018-07-27 15:02:41 +10:00
Damien Elmes
ee5eedeb3b strip out unused syncing code 2018-07-26 19:41:52 +10:00
Damien Elmes
2fdd9c89d5 differentiate easy button more when reviewing early
apply half the easy bonus post ivl calculation, or else very early
reviews with longer intervals appear to have the same intervals as
answering 'good'
2018-07-11 22:18:46 +10:00
Damien Elmes
f656a2da09 support customizing hard factor 2018-07-11 21:23:22 +10:00
Damien Elmes
18008909a4 face fix cond in sync test 2018-06-25 20:26:24 +10:00
Damien Elmes
d352ec7581 ignore delay in hard case
https://anki.tenderapp.com/discussions/ankidesktop/27627-request-allow-setting-maximum-delay-for-interval-calculation-in-overdue-cards
2018-06-01 12:24:11 +10:00
Damien Elmes
3d3cf3d135 fix no relearn steps case in v2 sched 2018-02-02 14:30:53 +10:00
Damien Elmes
7013cbcd57 experiment with counting learning cards instead of learning steps
When studying, the learning count now indicates the number of
learning cards due within the learn ahead limit, instead of the total
number of learning steps required to complete that day.

Also fix the ineffective limit clauses in the learning counts.
2018-01-31 14:50:17 +10:00
Damien Elmes
65b81b0a47 make preview delay customizable 2018-01-20 15:26:11 +10:00
Damien Elmes
a91829f9b7 update tests 2018-01-14 16:58:12 +10:00
Damien Elmes
f6176748c5 don't fetch reviews in deck order
- fetch reviews from all child decks at once, sorted by due order
- shuffle the gathered cards as we did previously
- review limits on child decks are ignored - only the current deck and
its parents control what the limit is
- to make the deck list consistent with actual counts, we can't sum the
child counts, as the sum in the parent limit>child limit case may not
reflect the actual number of cards that would be presented
2018-01-14 12:16:53 +10:00
Damien Elmes
65c779f25d distinguish between buried siblings and manually buried cards 2018-01-14 12:16:53 +10:00