[loop-generated] [test] Add unit tests for src/config.py — 599 lines, critical module #1172

Closed
opened 2026-03-23 20:31:05 +00:00 by Timmy · 2 comments
Owner

Problem

src/config.py is 599 lines with no dedicated unit tests. This is the configuration module — correctness matters.

Acceptance Criteria

  • Add tests/unit/test_config.py (there's a tests/test_config_module.py but check coverage)
  • Test config loading, defaults, overrides, env var handling
  • Aim for 80%+ line coverage of config.py
  • Tests pass with tox -e unit

Files

  • src/config.py
  • tests/unit/test_config.py (new)
## Problem `src/config.py` is 599 lines with no dedicated unit tests. This is the configuration module — correctness matters. ## Acceptance Criteria - Add `tests/unit/test_config.py` (there's a `tests/test_config_module.py` but check coverage) - Test config loading, defaults, overrides, env var handling - Aim for 80%+ line coverage of config.py - Tests pass with `tox -e unit` ## Files - `src/config.py` - `tests/unit/test_config.py` (new)
claude was assigned by Rockachopa 2026-03-23 20:33:15 +00:00
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1175

Added tests/unit/test_config.py with 118 new unit tests (pytestmark=pytest.mark.unit). All 293 unit tests pass with tox -e unit. Covers: normalize_ollama_url, Settings defaults, env overrides, type validation, _compute_repo_root, model_post_init token fallback, check_ollama_model_available, get_effective_ollama_model, validate_startup (dev/prod modes), APP_START_TIME, and the module singleton.

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1175 Added `tests/unit/test_config.py` with 118 new unit tests (pytestmark=pytest.mark.unit). All 293 unit tests pass with `tox -e unit`. Covers: normalize_ollama_url, Settings defaults, env overrides, type validation, _compute_repo_root, model_post_init token fallback, check_ollama_model_available, get_effective_ollama_model, validate_startup (dev/prod modes), APP_START_TIME, and the module singleton.
Author
Owner

Kimi Instructions

Add unit tests for src/config.py (599 lines, critical module, 0 tests).

Files to modify

  • Create tests/test_config.py

What to test

  • All public functions and classes in src/config.py
  • Focus on: config loading, validation, default values, environment variable overrides
  • Edge cases: missing config file, invalid values, empty config
  • Mock external dependencies (file I/O, env vars)

How to verify

tox -e unit

All new tests must pass. Aim for good coverage of the public API.

## Kimi Instructions Add unit tests for `src/config.py` (599 lines, critical module, 0 tests). ### Files to modify - Create `tests/test_config.py` ### What to test - All public functions and classes in `src/config.py` - Focus on: config loading, validation, default values, environment variable overrides - Edge cases: missing config file, invalid values, empty config - Mock external dependencies (file I/O, env vars) ### How to verify ``` tox -e unit ``` All new tests must pass. Aim for good coverage of the public API.
claude was unassigned by Timmy 2026-03-23 21:01:05 +00:00
kimi was assigned by Timmy 2026-03-23 21:01:05 +00:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1172