testsAndMisc/python_pkg/keyboard_coop/tests
Krzysztof kuhy Rudnicki 4e64c3deef feat(tests): improve keyboard_coop test coverage to 97%
- Add test for JSONDecodeError fallback dictionary loading
- Add test for game initialization (__init__)
- Add tests for handle_click on letter, enter button, and reset button
- Add tests for drawing methods (_draw_text_line, _draw_button, _draw_keyboard, _draw_ui)
- Add extensive tests for game loop (run) covering:
  - QUIT event handling
  - Mouse click events
  - ENTER key submission
  - R key reset
  - Letter key presses
  - Right click ignored
  - Special key ignored
  - Unknown event type ignored

Coverage improved from 58% to 97%. Remaining uncovered lines are:
- Line 351: Unreachable defensive code (force submit when no moves)
- Lines 398-404: Unreachable dead code (hover color branch)
2025-12-01 20:10:41 +01:00
..
__init__.py Add tests for multiple python_pkg modules 2025-12-01 19:49:44 +01:00
test_main.py feat(tests): improve keyboard_coop test coverage to 97% 2025-12-01 20:10:41 +01:00