test(pykotor): regression coverage for JSON export CI progress and GFF_JSON roundtrip#258
Draft
cursor[bot] wants to merge 2 commits into
Draft
test(pykotor): regression coverage for JSON export CI progress and GFF_JSON roundtrip#258cursor[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 recently merged behavior: installation JSON export progress reporting under CI-like environments, and GFF toolset JSON serialization after the
GFFJSONWriterrefactor.Type of Change
Package(s) Affected
Changes Made
Libraries/PyKotor/tests/test_resource_json_progress.py: Asserts_supports_live_progressreturnsFalsewhenCIorGITHUB_ACTIONSis set to common truthy strings, even if the stream reports a TTY, so percentage milestones stay on the logger path (matches the fix inresource_json.py).Libraries/PyKotor/tests/resource/formats/test_gff_json_roundtrip.py: Writes a minimal GFF withbytes_gff(..., ToolsetFormat.GFF_JSON), validates JSON structure, and round-trips throughread_gffto guard thewrite_gff→GFFJSONWriterintegration.Testing
Test Results
Risky behavior now covered
\rprogress and drop structured log lines relied on by tests and aggregators.GFFJSONWriteroutput remains valid JSON thatread_gffcan load, reducing risk of silent breakage in toolset/CLI GFF_JSON paths.Why this reduces regression risk
Both areas are shared infrastructure with high blast radius (all GFF JSON consumers; installation/CLI JSON export). The tests are deterministic, environment-independent except for explicit
monkeypatchof env vars, and assert observable contracts rather than snapshots.Checklist
Related Issues
Related to regression-test-coverage automation (cron).
Additional Notes
Full-repo
uv syncat workspace root may fail on optionalkotordiffresolution in this environment; tests were run withuv syncscoped toLibraries/PyKotoronly.