test(pykotor): regression coverage for case-aware install detection#328
Draft
cursor[bot] wants to merge 1 commit into
Draft
test(pykotor): regression coverage for case-aware install detection#328cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…progress Co-authored-by: PuritanWizard <th3w1zard1@users.noreply.github.com>
Contributor
|
Message that will be displayed on users' first pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risky behavior now covered
is_kotor_install_diracross three shared entry points (diff_tool/cli_utils,tools/patching,tslpatcher/diff/engine) after the Case-Aware Application merge (Case-aware application #151). These helpers gate install detection for diff, patching, and TSLPatcher workflows.ConfigReader.from_filepathcase-insensitive INI path resolution on POSIX (mod directory / filename casing mismatches)._supports_live_progressCI/GitHub Actions guard for JSON export progress logging (prevents silent loss of percentage milestones in automation).Test files added/updated
Libraries/PyKotor/tests/common/test_kotor_install_detection.py(15 parametrized cases across 3 detectors)Libraries/PyKotor/tests/tslpatcher/test_reader.py(1 case-mismatchfrom_filepathtest)Libraries/PyKotor/tests/cli/test_json_commands.py(3_supports_live_progresstests)Why these tests materially reduce regression risk
Install detection false negatives on Linux (case-mismatched
chitin.keyor install folder names) would mis-route diff/patch/CLI flows to folder mode instead of installation mode. The new tests lock in theCaseAwarePathbehavior introduced in #151 for all three duplicated detectors.ConfigReader.from_filepathis the production path used when loading mod INIs from disk; a regression would break TSLPatcher mod loading on case-sensitive filesystems when users or tooling pass differently-cased paths.The JSON export progress tests ensure CI/automation continues to receive log-visible percentage milestones rather than relying on TTY
\rlive updates that bypass structured logging.Validation
19/19 passed on Linux (case-mismatch install/INI tests skipped on Windows by design).