Repository navigation
Exclude identity-binding block from coverage to fix CI on master - #515
Merged
jongbinjung merged 1 commit intoNov 13, 2026
Merged
Conversation
The block added in uber#504 only runs when `_out_scalar is _in_scalar`, which is true for basic_int, numpy_int, and memview_int, but not for basic_str. Coverage is only measured on the basic_str copy of the shared API file, so the block showed up as uncovered and failed the 100% coverage gate on master. Co-Authored-By: Claude Code <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.
masterhas been failing the 100% coverage gate since #504 was merged (tests run). All tests pass, but coverage is reported as 99.67%:#504 added a block guarded by
if _out_scalar is _in_scalar:to the shared API file. That condition is true forbasic_int,numpy_int, andmemview_int, but false forbasic_str. Sincepyproject.tomlomits the three int copies and only measures coverage through thebasic_strcopy, the block is never executed in the measured file.This marks the block with
# pragma: no cover. It is still exercised by the int API tests added in #504.CI did not run on #504 before it was merged, which is why this was not caught there.
Test plan
uv run pytest tests/test_lib --cov=h3 --cov=tests/test_lib --cov-fail-under=100fails with 99.67% before this change, and passes with 100% (188 passed) after.ruff checkpasses._cy, andbasic_strstill uses the Python wrappers.🤖 Generated with Claude Code