test: TLK XML empty string and resource_json CI progress coverage#264
Draft
cursor[bot] wants to merge 2 commits into
Draft
test: TLK XML empty string and resource_json CI progress coverage#264cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Co-authored-by: Boden <th3w1zard1@users.noreply.github.com>
Co-authored-by: Boden <th3w1zard1@users.noreply.github.com>
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.
Description
Adds focused regression tests for two recently changed production paths on
master: TLK XML parsing when<string>has no text node, and_supports_live_progressso JSON/archive export uses log-friendly progress in CI instead of carriage-return live updates.Type of Change
Package(s) Affected
Risky behavior now covered
TLKXMLReader/io_tlk_xml: A<string id="N"/>or otherwise missing text node must deserialize to an empty string. This replaced aValueErrorpath; the test locks in the intended tolerant behavior so future edits do not accidentally reintroduce hard failures for valid-looking XML from editors or minimizers._supports_live_progressinresource_json: WhenCIorGITHUB_ACTIONSis set to a truthy value, live TTY-style progress must be disabled even if the stream reportsisatty() == True, so percentage milestones go through the logger and show up incaplogand CI logs. Clears env in the positive case so the test stays deterministic under GitHub Actions.Test files added/updated
Libraries/PyKotor/tests/resource/formats/test_tlk.py—test_xml_reader_self_closing_string_has_empty_textLibraries/PyKotor/tests/test_resource_json_progress.py— new module for_supports_live_progress(TTY vs non-TTY, CI /GITHUB_ACTIONSvariants)Why these tests materially reduce regression risk
Testing
Checklist
Related Issues
Related to recent
masterchanges inio_tlk_xml.pyandresource_json.py(TLK empty text handling; CI-aware live progress).Additional Notes
Tests clear
CI/GITHUB_ACTIONSwhere needed so they are not environment-flaky under Actions.