Skip to content

test(coverage): case-aware path regressions for diff CLI and indoor kits#313

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
impl/missing-test-coverage-5d23
Draft

test(coverage): case-aware path regressions for diff CLI and indoor kits#313
cursor[bot] wants to merge 1 commit into
masterfrom
impl/missing-test-coverage-5d23

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented Jun 1, 2026

Risky behavior now covered

  • is_kotor_install_dir (diff/kotordiff CLI): After PR Case-aware application #151, install detection uses CaseAwarePath so a mismatched directory or chitin.key casing still resolves on case-sensitive Linux mounts (common in modding/WSL workflows).
  • normalize_path_arg: PowerShell/Steam path quoting edge cases (mangled " path, trailing backslashes, wrapped quotes) — previously untested despite being user-facing CLI input handling.
  • load_kits_unified: Kit folder paths with wrong directory casing no longer silently yield zero kits on Linux.

Test files added/updated

  • Libraries/PyKotor/tests/diff_tool/test_cli_utils.py (new)
  • Libraries/PyKotor/tests/test_indoorkit_case_path.py (new)

Why these tests materially reduce regression risk

PR #151 changed production paths to CaseAwarePath without dedicated tests for diff_tool/cli_utils or tools/indoorkit. A future refactor back to plain Path would break install detection and kit loading for users on case-sensitive filesystems while appearing fine on Windows CI. These tests follow the same skip pattern as test_talktable.py for platform semantics and lock in the intended behavior with minimal fixtures.

Validation

uv run --directory Libraries/PyKotor pytest tests/diff_tool/test_cli_utils.py tests/test_indoorkit_case_path.py -v

13 passed (case-mismatch tests skipped on win32 by design).

Open in Web View Automation 

…orkit

Co-authored-by: PuritanWizard <th3w1zard1@users.noreply.github.com>
@github-actions github-actions Bot added python Pull requests that update python code libraries labels Jun 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Message that will be displayed on users' first pull request

@github-actions github-actions Bot added the size/S Small PR (30-100 lines) label Jun 1, 2026

from __future__ import annotations

import json
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🔨 Build Validation Summary

Version Check: Passed

Tool Builds

⚠️ HoloPatcher: cancelled
⚠️ HoloPazaak: cancelled
⚠️ HolocronToolset: cancelled
⚠️ KotorDiff: cancelled
⚠️ KotorMCP: cancelled


🎉 All builds validated successfully! This PR is ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries python Pull requests that update python code size/S Small PR (30-100 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant