Skip to content

test: cover diff CLI path utils and CI json export progress#312

Draft
cursor[bot] wants to merge 2 commits into
masterfrom
impl/missing-test-coverage-b526
Draft

test: cover diff CLI path utils and CI json export progress#312
cursor[bot] wants to merge 2 commits into
masterfrom
impl/missing-test-coverage-b526

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 31, 2026

Summary

Adds regression tests for recently merged production paths that lacked direct coverage.

Risky behavior now covered

  • diff_tool.cli_utils: PowerShell-style mangled path normalization (normalize_path_arg) and KOTOR install detection via case-aware chitin.key lookup (is_kotor_install_dir, from Case aware application Case-aware application #151).
  • resource_json._supports_live_progress: Ensures JSON export logs percentage milestones through the logger in CI/automation instead of TTY \r live updates (fix from json-export progress commit).

Test files added/updated

  • Libraries/PyKotor/tests/diff_tool/test_cli_utils.py (new)
  • Libraries/PyKotor/tests/cli/test_json_commands.py (CI/TTY progress helpers)

Why this reduces regression risk

  • Diff CLI and installation workflows depend on correct path parsing on Windows; mangled-quote handling is easy to break during refactors.
  • Case-mismatched install roots are common on Linux/macOS modding setups; install detection must keep resolving chitin.key after the CaseAwarePath migration.
  • CI log assertions for JSON export regress silently if live progress re-enables under fake TTYs—these tests lock the automation-friendly logging path.

Validation

pytest Libraries/PyKotor/tests/diff_tool/test_cli_utils.py \
  Libraries/PyKotor/tests/cli/test_json_commands.py::test_supports_live_progress_disables_in_ci \
  Libraries/PyKotor/tests/cli/test_json_commands.py::test_supports_live_progress_requires_tty_when_not_in_ci

13 tests passed locally.

Open in Web View Automation 

cursoragent and others added 2 commits May 31, 2026 10:06
Co-authored-by: PuritanWizard <th3w1zard1@users.noreply.github.com>
Co-authored-by: PuritanWizard <th3w1zard1@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Message that will be displayed on users' first pull request

@github-actions github-actions Bot added python Pull requests that update python code libraries size/M Medium PR (100-300 lines) labels May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 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/M Medium PR (100-300 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant