Repository navigation
One failure format across ub commands; default Python run finds tests/ - #13
Merged
Merged
Conversation
…/ for default Python runs - CRAP lines read '18.0 CRAP, 8 CC, 46% covered: pkg/fn' in ub crap and ub check. - ub check and ub mutate print one line per unkilled mutant: 'path:line survived > -> >='. - The no-executed-lines message names the custom or Python coverage command that ran. - Default unittest discovery runs tests/ or test/ when the top level holds no tests. - 'Wrote' prints the metrics path relative to the root. - ub mutate --scan says 'coverage unknown' when no report covers a file. - Tests clear ub's own gate for engines.py.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e498684302
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Round-3 dogfood fixes: one failure format for
ub crap,ub mutateandub check, and a default Python coverage run that findstests/.Changes
ub checknow prints theub crapline, so it shows CC and coverage:18.0 CRAP, 8 CC, 46% covered: pkg/fn(check.crap_line).ub checkprints each surviving or uncovered mutant assrc/ub_cli/engines.py:109 survived > -> >=, capped at 20 with... and N more; --verbose for all. Non-verboseub mutateprints the same line (check.mutant_line). A covered site with no recorded outcome counts as survived, as the engine's totals count it.Did `python3 -m coverage run ... -m unittest discover -s tests` run the tests?. It names the custom--coverage-commandtoo. For other languages it still says "the coverage command".unittest discover(with or without-s .), the top level has notest*.py, andtests/ortest/exists without__init__.py, ub runs-s tests. This lives inengines.py: it swapscrapper.runners.run_shellandtest_planinmutator.engineandcheck. Coverage runs and mutant runs therefore use the same tests inub crap,ub mutateandub check.vendor/, which is forbidden.shortcut:comment: a layout where-s .would find tests inside some other package is not detected.Wrote .metrics/crap.ednand.metrics/dry.ednprint relative to the root.--verbosekeeps upstream output; the parity test enforces this.ub mutate --scansays(coverage unknown)when no report covers a file, but not with--no-coverage. The observed(75 uncovered)came from the zero-hit report that the 0-test default run left behind. Fix 3b removes that cause.crap_report(threshold, the cap at exactly 10, and no-coverage),mutation_summaryscoring, and the verbose hint. Two redundant expressions are simplified:path == target or(is_relative_toalready holds for equal paths) and a.get(..., True)default that can never apply.Verification
make test:rm -rf target .metrics; $UB crap: before, exit 2 (Coverage reports show no executed lines ... Did the coverage command run the tests?). After:After COV:
$UB check -s src --use-existing-coverage --test-command "$TEST".Before (main de3c2c2): stdout 958 bytes, exit 1
After: stdout 1062 bytes, exit 1. No engines.py items remain. The remaining items are in signature.py and skill.py, which lead ub-cli-self-gate owns.
Not checked
tests/rewrite with pytest projects. They are untouched, because onlyunittest discoverargv is rewritten.ub checkwithout--test-commandon this repo, end to end.