Skip to content

test: cover play console helpers - #27

Merged
FidelisMM merged 1 commit into
FidelisMM:mainfrom
vgvr0:test/play-console-helpers
Oct 2, 2026
Merged

FidelisMM merged 1 commit into
FidelisMM:mainfrom
vgvr0:test/play-console-helpers

Conversation

@vgvr0

@vgvr0 vgvr0 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What

Adds unit tests for the Play Console helper functions covered by #20.

  • Tests parse_json_tail with:
    • multiple JSON lines, ensuring the last valid one wins
    • trailing log lines after JSON
    • invalid JSON-like lines
    • output with no JSON
    • both JSON objects and arrays
  • Tests form_url with:
    • a known form key (ads)
    • an unknown key
    • a form without its own URL

No production code changes were needed.

Closes #20

Tested against

  • Real store (which one, test app)
  • Only offline (compile/import)

Validation:

  • Ruff check passed
  • Unit tests passed: 30 tests
  • Python source compilation passed
  • git diff --check passed

Checklist

  • Publishing tools say "External action" in the docstring
  • No credentials, real account ids or personal data
  • README "Hard-won lessons" updated if this fixes a store quirk

@FidelisMM FidelisMM left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @vgvr0! This covers everything #20 asked for: last valid JSON line wins, trailing logs and invalid { lines are skipped, no JSON returns None, objects and arrays both work, and form_url handles known, unknown and index-only forms. Small and easy to read. I also made parse_json_tail scan top-down locally and the suite caught it. 30/30 pass, ruff clean, CI green. Merging now.

@FidelisMM
FidelisMM merged commit 7595bb8 into FidelisMM:main Oct 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit tests for play_console.parse_json_tail and form_url

2 participants