Skip to content

🧪 test(nmea): add comprehensive unit tests for Znt.pretty() - #42

Merged
schwehr merged 1 commit into
mainfrom
test/znt-pretty-coverage-7041674084485750338
Sep 23, 2026
Merged

schwehr merged 1 commit into
mainfrom
test/znt-pretty-coverage-7041674084485750338

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

🧪 [testing improvement description]

🎯 What: Improved test coverage and assertion precision for the public function Znt.pretty() in src/nmea/znt.py.

📊 Coverage:

  • Added test_znt_pretty_decoded_exact_format to assert exact multi-line string layout, field alignment (rjust(18)), header, and stringified float/int/str parameters.
  • Added test_znt_pretty_from_get_status to verify pretty() behavior when instantiated dynamically via get_status().
  • Added test_znt_pretty_missing_param_key_error to verify KeyError is raised when expected parameter keys are missing.

✨ Result: Enhanced test suite reliability for NMEA ZNT sentence formatting.


PR created automatically by Jules for task 7041674084485750338 started by @schwehr

- Add test_znt_pretty_decoded_exact_format for exact output verification
- Add test_znt_pretty_from_get_status for get_status initialization
- Add test_znt_pretty_missing_param_key_error for missing keys handling
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The reviewed tests comprehensively cover the stated behavior with no unresolved issues.

Review effort: Lite
Findings: None

What changed in this PR

Adds focused unit tests for Znt.pretty() formatting, dynamic status construction, and missing-key behavior.

Changes:

  • Verifies exact decoded output formatting.
  • Tests output from get_status().
  • Confirms missing parameters raise KeyError.
File Description
tests/​test_nmea/​test_znt.py Adds comprehensive Znt.pretty() tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@schwehr
schwehr merged commit 46bfce9 into main Sep 23, 2026
3 checks passed
@schwehr
schwehr deleted the test/znt-pretty-coverage-7041674084485750338 branch September 23, 2026 21:51
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.

2 participants