33 Commits

Author SHA1 Message Date
Type-Delta
885f35ac2c fix(test): AuthService lock file pollution 2026-04-06 10:55:15 +07:00
Type-Delta
6813dc9b4c test: Add comprehensive test coverage across modules
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
2026-04-06 09:01:45 +07:00
Type-Delta
e9c6841e28 fix(test): assertion string missmatch + mock webbrowser.open 2026-04-06 07:51:43 +07:00
Albert Medrano-Lopez
10d1211388 chore: improved grammar in "already logged in as" message
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 23:44:32 -08:00
Albert Medrano-Lopez
efa6f4d142 fix(tests): Resolve pyright type errors in anilist test_mapper.py
Updated mock data in `test_to_generic_user_profile_success` to conform to `AnilistViewerData` requirements.
Adjusted type annotations in tests with intentionally malformed data to `Any` to prevent pyright errors, ensuring proper validation of error handling.
2025-12-29 23:25:40 -08:00
Albert Medrano-Lopez
b62d878a0e feat(auth): Allow non-interactive Anilist authentication
This enhances the `anilist auth` command by allowing the authentication token to be provided directly as an argument or from a file. This provides a non-interactive way to authenticate, which is useful for scripting or for users who have issues with the interactive browser-based flow.

The `auth` command now accepts an optional `token_input` argument.
- If the argument is a valid file path, the token is read from the file.
- Otherwise, the argument is treated as the token itself.
- If no argument is provided, the command falls back to the previous interactive method.

The README is also updated to document these new authentication options.

This commit also includes:
- `test`: Unit tests for the new authentication logic (``test_auth.py``) and for the mapper fix (``test_mapper.py``).
- `fix(api)`: A fix in the Anilist API mapper to handle potentially missing data in the API response, making it more robust.
- `style`: Minor code style and formatting fixes throughout the codebase.
2025-12-29 04:05:28 -08:00
Benexl
007954802f chore: cleanup old testing strategy 2025-07-28 13:36:55 +03:00
Benexl
1c95d45be4 chore: ruff check 2025-07-26 10:57:05 +03:00
Benexl
75e67c22d2 chore: format with ruff 2025-07-26 10:56:26 +03:00
Benexl
5246a2fc4b feat: Implement TorrentDownloader class with libtorrent and webtorrent CLI support
- Added TorrentDownloader class for robust torrent downloading.
- Integrated libtorrent for torrent management when available.
- Implemented fallback to webtorrent CLI for downloading torrents.
- Added methods for downloading via libtorrent and webtorrent CLI.
- Included progress tracking and callback functionality.
- Updated pyproject.toml and uv.lock to include libtorrent as a dependency.
- Created unit tests for TorrentDownloader and legacy function for backward compatibility.
2025-07-24 23:37:00 +03:00
Benexl
67a174158d feat: implement episode range parsing and enhance search functionality with improved filtering options 2025-07-24 21:19:18 +03:00
Benexl
5e45fba66d chore: remove crazy ai tests 2025-07-22 15:42:51 +03:00
Benexl
0e6aeeea18 feat: update interactive session logic 2025-07-21 22:28:09 +03:00
Benexl
5dde02570a chore: leave testing for later 2025-07-15 22:53:10 +03:00
Benexl
e3deb28d26 chore:cleanup 2025-07-15 22:36:08 +03:00
Benexl
1a85b2f216 refactor: improve media actions tests with enhanced mocking and assertions 2025-07-15 01:23:38 +03:00
Benexl
0639a3c949 test: enhance authentication and main menu tests with detailed user profile and pagination handling 2025-07-15 01:12:25 +03:00
Benexl
bdbf0821c5 fix: tests 2025-07-15 00:44:49 +03:00
Benexl
5e81c44312 feat: copilot instructions 2025-07-15 00:16:58 +03:00
Benexl
41ed56f395 feat: tests 2025-07-15 00:02:55 +03:00
Benexl
de2ba342ad feat: improve config logic 2025-07-13 13:10:49 +03:00
Benexl
f51ceaacd7 test: placeholder tests 2025-07-07 00:41:24 +03:00
Benexl
3af31a2dfd feat: update config logic with new philosophy 2025-07-05 17:13:21 +03:00
Benexl
759889acd4 feat: new config logic 2025-07-05 03:06:49 +03:00
benex
383cb62ede style: format files 2024-12-02 22:26:03 +03:00
she11sh0cked
050ba740b8 fix(cli): prevent update check during completions 2024-11-19 15:24:55 +01:00
Benex254
3474e9520c tests: pass custom env 2024-09-29 22:09:57 +03:00
Benex254
7743b0423e chore: clean up codebase 2024-08-23 16:05:26 +03:00
Benex254
006592ae7d test: add grab command tests 2024-08-18 15:23:27 +03:00
Benex254
a4974fbba7 test: add test for update command 2024-08-12 00:48:55 +03:00
Benex254
c66cc52d53 tests: add tests for cache and completions command 2024-08-09 23:14:46 +03:00
Benex254
0b7f51d9f5 test: add tests to confirm all cli commands work as expected 2024-08-06 21:24:40 +03:00
Benex254
9187cc60f2 chore: init tests 2024-08-06 15:45:52 +03:00