Skip to content

test: audit pass — trim redundant tests, cover last-failed with filter#667

Closed
MatthewMckee4 wants to merge 1 commit intomainfrom
test/suite-audit-pass
Closed

test: audit pass — trim redundant tests, cover last-failed with filter#667
MatthewMckee4 wants to merge 1 commit intomainfrom
test/suite-audit-pass

Conversation

@MatthewMckee4
Copy link
Copy Markdown
Member

@MatthewMckee4 MatthewMckee4 commented Apr 11, 2026

Summary

Focused test-suite audit. Three deletions of redundant or convention-violating tests and one added integration test for a real coverage gap.

Changes

Deleted test_fail_fast and test_fail_fast_across_modules in basic.rs — they asserted on stdout.contains(...) instead of using insta_cmd::assert_cmd_snapshot!, and were already covered by test_failfast and test_failfast_multiple_threads.

Deleted the unit-test module in karva_runner/src/orchestration.rs that tested a local effective_workers helper reimplementing the worker-capping formula. It never touched the real run_parallel_tests path — a bug in production code couldn't have failed those tests. The integration test test_parallel_worker_capping already covers the real path end-to-end.

Deleted the two trivial FunctionKind::capitalised() unit tests in karva_python_semantic/src/function_kind.rs.

Added last_failed_with_filter_narrows_rerun_set in it/last_failed.rs, covering the --last-failed + -E combination that had no integration test since the filterset DSL landed in #663.

Follow-ups (bugs found, not fixed here)

karva test --dry-run -E … ignores filter expressions. In crates/karva/src/commands/test/mod.rs the dry-run branch runs collect_tests and prints everything before FiltersetSet::new is constructed.

-qq silent mode is unreachable from the CLI. Verbosity::level() only checks self.quiet > 0 and returns Quiet, so VerbosityLevel::Silent is never produced despite being advertised in help text.

Test Plan

  • `just test` passes (808 tests)
  • `uvx prek run -a` passes

…r coverage

Removes two non-snapshot fail-fast tests in basic.rs that duplicated the
existing snapshot-based coverage, deletes trivial unit tests in
function_kind.rs and a helper-formula test module in orchestration.rs that
was testing a copy of the production logic, and adds an integration test
covering the last-failed plus filterset workflow.
@MatthewMckee4 MatthewMckee4 added internal An internal refactor or improvement rust Pull requests that update rust code labels Apr 11, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 11, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 1 untouched benchmark


Comparing test/suite-audit-pass (4a9d34b) with main (c05b0d3)

Open in CodSpeed

@MatthewMckee4
Copy link
Copy Markdown
Member Author

Superseded by #670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant