Skip to content

Show fixture dependency chain in error messages#487

Merged
MatthewMckee4 merged 1 commit intomainfrom
fixture-dependency-chain-errors
Feb 17, 2026
Merged

Show fixture dependency chain in error messages#487
MatthewMckee4 merged 1 commit intomainfrom
fixture-dependency-chain-errors

Conversation

@MatthewMckee4
Copy link
Member

Summary

  • When a fixture dependency chain fails (e.g., test requires db -> connection -> config, and config fails), the error now shows the full dependency path
  • Previously: Fixture config failed here
  • Now: Fixture configfailed here (required bydb->connection)

Test plan

  • Added integration test test_fixture_dependency_chain_failure with a 3-level fixture chain (test -> db -> connection -> config, where config fails)
  • All 641 existing tests pass
  • Pre-commit checks pass

When a fixture dependency chain fails (e.g., test requires `db` -> `connection` -> `config`, and `config` fails), the error now shows the full dependency path so users can trace failures:

"Fixture `config` failed here (required by `db` -> `connection`)"

Previously, only the failing fixture name was shown with no context about how the test depended on it.
@MatthewMckee4 MatthewMckee4 added reporting Related to the output of Karva extensions/fixtures Related to fixtures labels Feb 17, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 17, 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 fixture-dependency-chain-errors (217e7ff) with main (446d5a7)

Open in CodSpeed

@MatthewMckee4 MatthewMckee4 merged commit 7b00a40 into main Feb 17, 2026
16 of 17 checks passed
@MatthewMckee4 MatthewMckee4 deleted the fixture-dependency-chain-errors branch February 17, 2026 15:35
MatthewMckee4 added a commit that referenced this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions/fixtures Related to fixtures reporting Related to the output of Karva

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant