summaryrefslogtreecommitdiffstatshomepage
path: root/tests (unfollow)
Commit message (Collapse)AuthorLines
7 daysbackend/lint: Do not shadow certain builtinsWolfgang Müller-17/+17
This commit enables ruff's flake8-builtin linter that emits warnings when builtin functions are shadowed. This is useful for builtins like "dict", "list", or "str" which we use often. Given the nature of this program we historically rely a lot on the usage of "id", "hash", and "filter" as variable names which also shadow Python builtins. For now let's ignore those, we have not used any of them in our code and the impact to the codebase would be considerable. This might be revisited in the future.
7 daysbackend/plugins: Throw error if E-Hentai response is missing 'gmetadata'Wolfgang Müller-0/+16
It might be that we get a valid (maybe empty) response from the API, in which case we do not want to simply crash because we expect the 'gmetadata' field in the response. Instead, throw a proper ScrapeError for it.
7 daysbackend/tests: Add tests for the E-Hentai APIWolfgang Müller-0/+140
7 daysbackend/tests: Add tests for the anchira scraperWolfgang Müller-0/+107
7 daysbackend/tests: Remove unneeded parameter in test_gallery_dlWolfgang Müller-1/+1
7 daysbackend/plugins: Have exhentai assume no censorship for non-hWolfgang Müller-2/+5
Non-H usually has nothing to censor, so this should be a safe default. We have not come across anything where this would have been a false positive.
8 daysbackend/tests: Add tests for gallery_dl scrapersWolfgang Müller-0/+646
8 daysbackend/scraper: Have collect() ignore None resultsWolfgang Müller-0/+15
If a parser function returned None we yield it regardless, even though it won't have any impact further down the line. Instead clean up the collect() stream as early as possible.
8 daysbackend/tests: Add test for open_archive_fileWolfgang Müller-1/+40
8 daysbackend/scraper: Add parser methods for LanguageWolfgang Müller-0/+33
We can expect a number of scraper sources to either give languages as ISO 639-3 or as their English name, so it makes sense to implement a simple parser method on our side.
8 daysbackend/lint: Format overlong lineWolfgang Müller-1/+3
8 daysbackend/lint: Implement flake8-simplify suggestionsWolfgang Müller-13/+12
8 daysbackend/lint: Fix import formattingWolfgang Müller-16/+35