testsAndMisc/python_pkg/lichess_bot/tests
Krzysztof kuhy Rudnicki 38fe3ef53e Add comprehensive tests for lichess_bot main.py and lichess_api.py
- Fix test_process_game_event_game_end to properly mock engine
- Fix test_handle_game tests to mock _run_analysis_subprocess to prevent hanging
- Fix test_process_game_start_event to mock analysis subprocess
- Add test_process_game_event_game_end_after_move to cover game end status path
- Add test_process_game_event_color_unknown_on_gamefull to cover gameFull with spectator
- Add tests for lichess_api.py covering spectator case and join_game_stream edge cases
- Fix mypy type errors with Event and GameThreads type aliases

Coverage:
- lichess_api.py: 100% (was 98%)
- main.py: 99% (branch partials for loop exits only)
2025-12-02 21:53:15 +01:00
..
__init__.py refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
conftest.py fix(lint): fix S603 in engine.py and D100 in conftest.py 2025-11-30 23:43:34 +01:00
test_engine.py feat(tests): add comprehensive tests for lichess_bot engine and API 2025-12-01 20:41:51 +01:00
test_lichess_api.py Achieve 100% coverage for lichess_api.py 2025-12-01 20:46:09 +01:00
test_main.py Add comprehensive tests for lichess_bot main.py and lichess_api.py 2025-12-02 21:53:15 +01:00
test_puzzles.py fix(lint): fix G004 and PTH123 violations across codebase 2025-11-30 23:57:49 +01:00
test_utils.py refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
test_versioning.py Improve lichess_bot utils.py test coverage to 100% 2025-12-01 20:02:05 +01:00