Skip to content

Full line coverage of libwcwidth, ~96% branch - #328

Merged
jquast merged 11 commits into
masterfrom
test/c-coverage-100
Nov 13, 2026
Merged

jquast merged 11 commits into
masterfrom
test/c-coverage-100

Conversation

@jquast

@jquast jquast commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

This brings C11 libwcwidth coverage to 100% line coverage and ~96% branch coverage.

By testing reachable paths, enabling assertions, and most importantly:
deleting unreachable code.  Careful fuzzing, tests, and consideration is
given to try to discover wither code is truly unreachable, and
input-size-dependent overflow checks are given for 32-bit builds.
The phrasing cleanups now live on docs/comment-phrasing, leaving this
branch with the 100% libwcwidth coverage work alone.
# Conflicts:
#	libwcwidth/CMakeLists.txt
#	libwcwidth/src/sgr.c
#	libwcwidth/src/textwrap.c
#	libwcwidth/src/width.c
#	libwcwidth/tests/test_oom.c
#	libwcwidth/tests/test_sgr.c
#	libwcwidth/tests/test_textwrap.c
#	setup.py
#	tests/test_core.py
#	tox.ini
@jquast
jquast marked this pull request as ready for review November 13, 2026 17:24
@codspeed

codspeed Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ Upgrade your CodSpeed plugin for Python 3.15

pytest-codspeed 5.0.3 is only tested on Python 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14, so your Python 3.15 measurements may be inaccurate. Upgrade pytest-codspeed to 5.0.4 or later.

See affected benchmarks

✅ 146 untouched benchmarks


Comparing test/c-coverage-100 (72a194b) with master (1585e45)

Open in CodSpeed

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.91%. Comparing base (1585e45) to head (72a194b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #328      +/-   ##
==========================================
+ Coverage   91.46%   95.91%   +4.44%     
==========================================
  Files          44       44              
  Lines        6388     6384       -4     
  Branches     1806     1773      -33     
==========================================
+ Hits         5843     6123     +280     
+ Misses        164        0     -164     
+ Partials      381      261     -120     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast jquast changed the title Full coverage of libwcwidth Full line coverage of libwcwidth, ~94% branch Nov 13, 2026
@jquast jquast changed the title Full line coverage of libwcwidth, ~94% branch Full line coverage of libwcwidth, ~96% branch Nov 13, 2026
@jquast
jquast merged commit 0ca0679 into master Nov 13, 2026
38 checks passed
@jquast
jquast deleted the test/c-coverage-100 branch November 13, 2026 19:24
@jquast
jquast restored the test/c-coverage-100 branch November 13, 2026 19:24
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