Improve test coverage and remove dead code#538
Merged
MatthewMckee4 merged 3 commits intomainfrom Mar 21, 2026
Merged
Conversation
Add 21 new tests covering previously uncovered code paths across karva_test_semantic, karva_snapshot, and the main karva crate. Remove unused `report_invalid_path`, `INVALID_PATH` diagnostic type, and `RequiresFixtures` impl on `DiscoveredTestFunction`. New integration tests: - Monkeypatch setattr/delattr with dotted import paths - MockEnv.context() classmethod - Monkeypatch delitem raising behavior - Pytest custom marks with tag filtering - pytest.param with marks lists and skip reasons - Async generator fixtures (basic, teardown, multiple yields, errors) - Command.current_dir() for snapshot commands - Invalid karva fixture scope - Concise output format with failures and discovery errors - Snapshot accept/reject/pending with no pending snapshots New unit tests: - format_cmd_output with no trailing newlines on stderr/both - SnapshotFile::parse with inline metadata fields
The coverage job was generating an HTML report and uploading it as a GitHub artifact, but never uploading to Codecov. Add LCOV export to the justfile coverage recipe and a codecov-action step to CI.
Codecov receives the LCOV data directly, making the HTML artifact upload unnecessary.
Merging this PR will not alter performance
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
just coveragereport_invalid_pathfunction,INVALID_PATHdiagnostic type, andRequiresFixturesimpl onDiscoveredTestFunctionNew integration tests
setattr/delattr,MockEnv.context()classmethod,delitemraising behavior-ttag filtering,pytest.paramwith marks lists and skip reasonsCommand.current_dir(), accept/reject/pending with no pending snapshots--output-format=concisewith failures and discovery errorsNew unit tests
format_cmd_outputedge cases (no trailing newlines on stderr/both)SnapshotFile::parsewithinline_source/inline_linemetadataTest plan
just test— all 706 tests passuvx prek run -a— all checks pass🤖 Generated with Claude Code