Repository navigation
test: close remaining 1% coverage gap — 6 modules to 100% - #100
Merged
Merged
Conversation
Adds targeted tests for 8 previously untested defensive guards across 6 modules, bringing all non-CLI source files to 100% branch coverage: - evaluate.py: enrichment_factor(k=0) → 0.0 guard - retrospective.py: _bootstrap_auroc_ci with empty pos or neg → chance return - template_mutator.py: _conservative_substitutes(unknown AA) → []; single-AA guard in generate_double_substitution_variants and generate_aggregation_safe_double_variants - diversity.py: cluster_panel inner-loop skip when j already has a cluster - pilot.py:173: Phase 3 fill from per-seed overflow remainder - pipeline.py:105: build_run_manifest non-existent input → "N/A" hash Only 6 lines remain uncovered: structural CLI argparse/main guards that cannot be exercised by pytest without spawning a subprocess.
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
argparse/if __name__ == \"__main__\"guards that cannot be hit by pytest without spawning a subprocessModules covered
benchmark/evaluate.pyenrichment_factor(k=0)guardTestEnrichmentFactorEdgeCasesbenchmark/retrospective.py_bootstrap_auroc_ciempty-pos/neg early returnTestBootstrapAurocCigenerators/template_mutator.py_conservative_substitutesunknown AA; single-AA guards in double/aggregation generatorsanalysis/diversity.pycluster_panelinner-loop skip for already-assigned jTestClusterPanelAlreadyAssignedSkipselection/pilot.pyTestPilotPhase3FillFromRemainderpipeline.pybuild_run_manifestnon-existent input →"N/A"hashtest_manifest_missing_input_gets_na_hashTest plan
pytest --tb=short -q→ 1321 passed, 0 failedpytest --cov=src/openamp_foundry --cov-report=term-missing→ 99% total (6 unreachable CLI lines only)_c()helper fixed (uses correctsourceandscoresfields)🤖 Generated with Claude Code