Skip to content

Exclude identity-binding block from coverage to fix CI on master - #515

Merged
jongbinjung merged 1 commit into
uber:masterfrom
jongbinjung:fix-coverage-identity-binding
Nov 13, 2026
Merged

jongbinjung merged 1 commit into
uber:masterfrom
jongbinjung:fix-coverage-identity-binding

Conversation

@jongbinjung

Copy link
Copy Markdown
Collaborator

master has been failing the 100% coverage gate since #504 was merged (tests run). All tests pass, but coverage is reported as 99.67%:

h3/api/basic_str/__init__.py       242      6    98%   1374-1389

#504 added a block guarded by if _out_scalar is _in_scalar: to the shared API file. That condition is true for basic_int, numpy_int, and memview_int, but false for basic_str. Since pyproject.toml omits the three int copies and only measures coverage through the basic_str copy, 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=100 fails with 99.67% before this change, and passes with 100% (188 passed) after.
  • ruff check passes.
  • Confirmed the int APIs still bind the nine functions directly to _cy, and basic_str still uses the Python wrappers.

🤖 Generated with Claude Code

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>
@jongbinjung
jongbinjung merged commit cb852ab into uber:master Nov 13, 2026
59 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.

1 participant