-
Notifications
You must be signed in to change notification settings - Fork 221
Conversation
It seems this unit test is still having a trouble:
|
It seems that the test only fails on Anki 2.1.46 and below; does Also, you can run tests yourself. See the comment in |
Oh, and this change has way too many lines changed. Perhaps an issue with line endings? |
It does seem to being a line ending problem. I will try to fix it. With regarding the Anki lower version issue, is there a preferred way of handle behavior that is different between Anki versions? Should I remove total_in_deck from the stats completely, or should there be a separate codepath that adds it if supported? |
I'm no authority here, but if you asked me, there are four ways, in order of least preference:
Anki mixes “stable” versions (e.g. 2.1.49) and not-quite-stable (e.g. 2.1.50). I'm not sure if 2.1.45 and 2.1.46 are stable, or in other words, that many users use these versions. If we can figure which versions are not stable, we can drop support of them. That would be the best solution I guess? (Users who do use versions like 2.1.45 will still be able to use Anki-Connect, just without the new updates.) |
I have added a version check and only add the |
I have fixed the line endings. Thank you for the patience! |
Nice! Perhaps also update the readme to say that It would also be nice to test some numbers maybe? The tests run in isolation so you can count on them being zeros. Or you can test using the setup fixture, it has a few cards. (P.S. This is a matter of personal taste; I prefer to say |
Sorry that I did not see this earlier! When I first implemented getDeckStats, it supported only one deck per call. When updated to support multiple decks I did not properly update the unit test. This should resolve the CI build error due to the test failing after #318. I apologize for any trouble!