refactor(libanki): add libanki:testutils#18862
Merged
david-allison merged 2 commits intoankidroid:mainfrom Jul 18, 2025
Merged
Conversation
This is for test extensions to `libanki` (depending on `col`) which are used in both `libanki` and `AnkiDroid` tests These have an `anki` dependency, but no strong `android` dependencies Primarily: `TestClass`, but also a number of methods which have neither an Android nor an AnkiDroid dependency These can't exist in `libanki` tests, as you can't depend on test modules These shouldn't exist in `libanki`, as they should only be visible to test modules
5 tasks
Member
|
I'd just like some javadoc on the new interface. Even it only is In particular, i must admit i've little intuition of what you'd do with the backend method Once documented fell free to merge |
7858071 to
43d8478
Compare
Member
Author
|
@Arthur-Milchior As this is in a module which does not depend on
|
43d8478 to
335219a
Compare
allow us to move `TestClass` to `libanki:testutils`
335219a to
c8a902a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I split this out from #18813 to make it an easier review
TestClassand renameTestClasstoAnkiTest#18813libanki/testAnkiDroid/testThese utilities are mostly:
TestClass: a unit test with access to the Anki CollectionTestClasswill have aTestCollectionManager, which is the first interface which we extract in this PRlibankiusing an in-memory collectionCollectionManagerwill be available, if the disk is requiredChecklist