This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Fix: failing test + add unit tests for core features + re-enable test step in Actions#201
Open
Type-Delta wants to merge 7 commits intomasterfrom
Open
Fix: failing test + add unit tests for core features + re-enable test step in Actions#201Type-Delta wants to merge 7 commits intomasterfrom
Type-Delta wants to merge 7 commits intomasterfrom
Conversation
Adds extensive test suite covering CLI notifications, auth service, file utilities, networking, AniList API integration, mappers, API factory, MPV player, and selector implementations. Includes 900+ lines of test code covering main workflows and edge cases. Minor refactor to improve dict type safety in AniList API client. - CLI and service layer tests - Utility function tests - Media API and mapper tests - Player and selector factory tests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a failing AniList deletion path, expands unit test coverage across core utilities and key integrations (media API, selectors, player, CLI auth/notifications), and re-enables the pytest step in GitHub Actions to enforce test execution in CI.
Changes:
- Harden AniList
delete_list_entryparsing to avoid crashes whenMediaListis missing/malformed. - Add unit tests for selector factory, MPV player behavior, API client factory, AniList API + mappers, auth service, CLI auth, CLI notifications, and core file/networking utilities.
- Re-enable
uv run pytest testsin the Actions workflow.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| viu_media/libs/media_api/anilist/api.py | Safer extraction of MediaList.id for delete operations |
| viu_media/cli/utils/icat.py | Adds a Windows guard inside get_key() |
| viu_media/cli/commands/anilist/commands/auth.py | Fixes spacing in relogin confirmation prompt |
| tests/libs/selectors/test_selector_factory.py | New selector factory tests |
| tests/libs/player/mpv/test_player.py | New MPV player unit tests |
| tests/libs/media_api/test_api_factory.py | New API client factory tests |
| tests/libs/media_api/anilist/test_mapper_extended.py | Expanded mapper tests for more payload shapes |
| tests/libs/media_api/anilist/test_api.py | New AniList API unit tests (auth/search/update/delete) |
| tests/core/utils/test_networking.py | New tests for UA generation + remote filename parsing |
| tests/core/utils/test_file.py | New tests for atomic writes, file locks, mtime checks, sanitization |
| tests/cli/service/auth/test_service.py | New tests for auth persistence and clearing |
| tests/cli/commands/anilist/commands/test_notifications.py | New CLI notifications command tests |
| tests/cli/commands/anilist/commands/test_auth.py | Updates auth tests to patch webbrowser.open and assert URL |
| .github/workflows/test.yml | Re-enables pytest execution in CI |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.