Skip to content
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
fix/test
Open

Fix: failing test + add unit tests for core features + re-enable test step in Actions#201
Type-Delta wants to merge 7 commits intomasterfrom
fix/test

Conversation

@Type-Delta
Copy link
Copy Markdown
Collaborator

No description provided.

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
Copilot AI review requested due to automatic review settings April 6, 2026 03:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_entry parsing to avoid crashes when MediaList is 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 tests in 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

Comment thread viu_media/cli/utils/icat.py
Comment thread tests/cli/service/auth/test_service.py Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants