Add unit tests for testenv package #1

Closed
opened 2026-05-14 04:47:39 +00:00 by Mark · 0 comments
Owner

The testenv/ Python package currently has no automated tests. We need:

  • Unit tests for DesktopSession (mock pyautogui, mock subprocess)
  • Tests for each deployer (binary, apt, appimage, source) with mocked filesystem/subprocess
  • Tests for AccessibilityTree with mocked pyatspi
  • Tests for ScreenshotCapture backend fallback logic
  • Tests for ActionLogger file I/O and streaming

Files to create:

  • tests/test_automation.py
  • tests/test_accessibility.py
  • tests/test_screenshot.py
  • tests/test_actionlog.py
  • tests/test_deployers.py

Use pytest with unittest.mock for external dependencies.

Why: Without tests, regressions in the automation API or deployers will only be caught during manual Docker runs.

The `testenv/` Python package currently has no automated tests. We need: - Unit tests for `DesktopSession` (mock pyautogui, mock subprocess) - Tests for each deployer (`binary`, `apt`, `appimage`, `source`) with mocked filesystem/subprocess - Tests for `AccessibilityTree` with mocked `pyatspi` - Tests for `ScreenshotCapture` backend fallback logic - Tests for `ActionLogger` file I/O and streaming Files to create: - `tests/test_automation.py` - `tests/test_accessibility.py` - `tests/test_screenshot.py` - `tests/test_actionlog.py` - `tests/test_deployers.py` Use `pytest` with `unittest.mock` for external dependencies. **Why:** Without tests, regressions in the automation API or deployers will only be caught during manual Docker runs.
Mark 2026-05-23 00:52:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_app_testing_environment_setup#1
No description provided.