Commit Graph

75 Commits

Author SHA1 Message Date
Damien Elmes
ea82126fcb update tests 2018-01-14 16:58:12 +10:00
Damien Elmes
21023ed3e5 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
4e52f43365 distinguish between buried siblings and manually buried cards 2018-01-14 12:16:53 +10:00
Damien Elmes
62c1fa4a17 preserve learning/filtered state when suspending/burying
add new card type of 3 so we can distinguish cards in relearning from
normal reviews
2018-01-14 12:16:53 +10:00
Damien Elmes
ba87fc7736 experiment with simple resched=off case to 'preview mode'
the previous approach meant we weren't able to preserve the card state
exactly when cards were in learning, since we didn't record the step
position prior to cards being moved into the filtered deck.

it also meant the answer buttons needed to change depending on state - 4
for cards in learning/review, but 2 when the card is on the final step
or is a review.

instead, in preview mode cards always have 2 buttons: again will repeat
again after a delay, and good immediately removes the card and restores
it to its previous state.

to accomplish this, we use a separate queue #, as the learn count
always needs to have a 1:1 correspondence to the number of cards
2018-01-14 12:16:53 +10:00
Damien Elmes
765ec0fb36 use the review queue for undue reviews 2018-01-14 12:16:53 +10:00
Damien Elmes
563e93b0ba ensure due reviews+resched off works 2018-01-14 12:16:53 +10:00
Damien Elmes
68445d7243 add test for new position preservation 2018-01-14 12:16:53 +10:00
Damien Elmes
4070f4eef8 schedtest changes, squashed from local branch 2018-01-14 12:16:53 +10:00
Damien Elmes
7ac601f0af fix 'unclosed file' warnings with python -Wall 2017-12-11 16:38:15 +10:00
Damien Elmes
c67fc3e769 fix time translation patch 2017-12-04 12:33:23 +10:00
Damien Elmes
d0929e5bab run unit tests in parallel 2017-10-05 14:17:12 +10:00
Damien Elmes
8737c6737b another fix for mathjax+cloze 2017-09-12 13:53:08 +10:00
Damien Elmes
67728e73d7 fix broken cloze deletion 2017-09-10 19:51:25 +10:00
Damien Elmes
c18bd47a6e scan media each time
Experiment with ignoring dirMod and scanning the folder for changes on
each sync. Use scandir() for better performance. Please let me know if
this causes a noticeable slowdown for you.
2017-08-29 10:52:13 +10:00
Damien Elmes
08e0174f2e remove dupeOnSchemaChange
no longer required now that anki 1.x importing dropped
2017-08-21 13:50:11 +10:00
Damien Elmes
d330d2f77f fix unit tests 2017-08-15 21:31:58 +10:00
Damien Elmes
71101d041a ditch marked tag in favour of card flags
Users can now mark individual cards with one of four different coloured
flags, instead of relying on a tag that applied to the whole note.

- replaced marking functionality in reviewer and browser with new
flag options
- added flag:x search
- marked and leech tags now show in normal tag list in filter screen,
instead of being treated specially
- the other clients will need updating to set and shown the flags, but
flags set in the beta should be preserved by the other clients
2017-08-12 16:08:10 +10:00
Damien Elmes
83c96770c8 fix latex tests 2017-08-01 14:25:49 +10:00
Damien Elmes
aa89d06304 Revert "don't rely on cwd in media.py"
This reverts commit 975ca90225.

reverting for now as it breaks showing of images during review
2017-04-11 12:50:33 +10:00
Joel Kitching
975ca90225 don't rely on cwd in media.py
media.py sets CWD to the media directory of the collection
(collection.media), and relies on that directory being
maintained as CWD throughout execution.  The original CWD
is restored in the close() function.

Remove reliance on CWD being set and maintained throughout
execution of media.py.  Improves portability and usability
in different codebases.
2017-03-07 15:55:40 +08:00
Damien Elmes
c17e68d5f3 Merge pull request #176 from luoliyan/escape-sql-queries
Allow user to escape special characters in tags
2017-03-01 22:49:47 +10:00
luoliyan
62a76b3ad9 Test special characters in tag search 2017-02-28 08:11:32 +09:30
Damien Elmes
ef5ed0ebf3 fix unit test on python 3.6 2017-02-27 14:29:23 +10:00
Damien Elmes
227ca090db use a constant for the starting factor 2017-02-08 17:28:12 +10:00
Damien Elmes
18ccf26a2e fix intermittent failing test 2017-02-08 16:54:59 +10:00
Damien Elmes
dc022142cf fix test_find.py tests 2017-02-08 16:49:59 +10:00
Damien Elmes
e3efe8e10e fix intermittently failing tags test 2016-09-05 18:25:44 +10:00
Damien Elmes
85665bc18d fix latex check 2016-07-04 17:07:48 +10:00
Damien Elmes
0c20da1069 fix conditional templates 2016-06-30 22:23:31 +10:00
Damien Elmes
15b349e3a8 start port to python 3
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Damien Elmes
1dce3eaaff drop anki1 upgrade code 2016-05-12 14:20:59 +10:00
Arne Ludwig
d8d9bf4dcd Extended LaTeX tests on bad commands 2015-07-30 12:43:41 +02:00
Damien Elmes
b0f7ddfefb don't bump mod time when moving cards into/out of a filtered deck
fixes the following:
- create a filtered deck and sync it
- review cards in the filtered deck and delete it
- sync again

The filtered deck deletion was bumping the mod time on cards at the
start of the sync, preventing the reviews from being synced from the
other side, leading to lost reviews and sanity check errors.
2015-03-19 15:35:04 +11:00
Damien Elmes
354fbd33f6 fix media test 2014-07-28 14:26:40 +09:00
Soren I. Bjornstad
c3434ff751 update note type on apkg import when only templates have changed
Previously, it only updated if card/note count was different, even if
the templates / styling information had been updated.
2014-06-28 13:51:30 -05:00
dae
d358686c07 remove remote sync tests, as they can't be run by regular users 2014-06-03 18:22:29 +09:00
dae
54a85f6be7 disable broken unit test 2014-06-03 18:17:02 +09:00
dae
8491c907ba fix cloze order
must be next to Text now; will document
2014-06-03 18:05:09 +09:00
dae
09253b661c getEmptyDeck() -> getEmptyCol() 2014-06-03 17:38:47 +09:00
dae
e5ed110d65 fix latex test 2014-06-03 17:25:43 +09:00
ispedals
bd289fc37e Close file descriptors before unlinking
Unlinking a file before closing may not be supported on non-POSIX systems
such as Windows. This allows more tests to run to completion.
2014-04-21 17:08:21 -04:00
Julien Baley
a88a8429e2 Makes the test agree with the current behaviour of chained mod (cloze not always first) 2014-04-15 17:39:09 +01:00
Damien Elmes
8b1cca0412 remove debug statements from test 2014-02-19 18:01:29 +09:00
Damien Elmes
6da0e688b3 Merge pull request #64 from julienbaley/chained_mods
Chained mods
2014-02-19 17:59:57 +09:00
Julien Baley
37753b1ffd Adding tests for chained modifiers 2014-02-18 17:26:41 +00:00
Damien Elmes
a0f16d8ecb Merge pull request #59 from chreekat/faster-tests
Speed up tests
2014-02-17 11:22:14 +09:00
Bryan Richter
04d3901491 Test against the value itself 2014-02-12 23:46:38 -08:00
Bryan Richter
827bb84418 Re-use an empty deck to save on creation time. 2014-02-12 23:33:44 -08:00
Bryan Richter
349c95d17a Fix supermemo import test
Broken by 656698d, "Add A Factor to E Factor conversion..."
2014-02-12 23:23:15 -08:00