test: add unit tests for utils.py and cortex_client.py (#210)#211
Merged
Conversation
Release 1.18.0: Python 3.14 support, dependency security fixes
Also add workflow_dispatch to allow manual publish triggers. Includes trivial __init__.py touch to trigger publish for 1.18.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…events PEP 649 deferred annotation evaluation causes `list[str]` to resolve to the `def list()` function instead of the builtin. Use typing.List and typing.Optional instead. Also add typing_extensions as explicit dependency (no longer pulled in transitively by newer Typer). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
tests/test_utils.py(33 tests) coveringguess_data_key,get_value_at_path,matches_filters,humanize_value,print_output, andprint_output_with_contexttests/test_cortex_client.py(16 tests) covering error handling, version fallback, response fallbacks,fetchedge cases, and entity helper methodsCoverage impact:
utils.py: 62% → 99%cortex_client.py: 74% → 97%Closes #210
Test plan
poetry run pytest tests/test_utils.py -v— 33 passedpoetry run pytest tests/test_cortex_client.py -v— 16 passedjust test-all— 623 passed, 0 failed🤖 Generated with Claude Code