Skip to content

test: cover pre-existing defensive branches to reach 100%#321

Merged
henryiii merged 1 commit into
mainfrom
henryiii/test/coverage-gaps
Jun 29, 2026
Merged

test: cover pre-existing defensive branches to reach 100%#321
henryiii merged 1 commit into
mainfrom
henryiii/test/coverage-gaps

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

The combined CI coverage report has several pre-existing uncovered lines (defensive if not isinstance(...): return guards and a few helper edge cases) that exist on main, independent of any feature work. They block the codecov/project 100% target on PRs that get codecov status posted (e.g. #241).

This PR adds targeted unit tests in tests/test_internals.py covering:

  • _dispatch.get_name (origin-with/without-args branches) and __dir__
  • pyproject.ensure_list / ensure_dict None/wrong-type returns
  • pyproject.get_dynamic
  • errors.ErrorCollector.config_error got_type branch
  • _validate_import_names non-list guard
  • project_table.validate_via_prefix wrong-type early returns (license, readme, version, dependencies, requires-python)

No source changes — tests only. Verified locally that all previously-flagged lines are now covered; remaining local misses are version-specific blocks covered by the 3.8/3.9 matrix jobs.

These pre-existing early-return guards and helper edge cases were
uncovered in the combined CI coverage report. Add targeted unit tests
for get_name, ensure_list/ensure_dict, get_dynamic, config_error's
got_type branch, _validate_import_names, and the validate_via_prefix
wrong-type guards so coverage reaches 100%.

Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii merged commit a2b87ad into main Jun 29, 2026
24 checks passed
@henryiii henryiii deleted the henryiii/test/coverage-gaps branch June 29, 2026 22:42
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