test: consolidate functional test classes onto shared project fixtures - #767
Merged
Merged
Conversation
…xtures Continues the class-merging optimization: query_options, index_config, transactions, and full_refresh_build now share one project/schema per file (or per isolation-requiring group) instead of one per test class, since project setup dominates runtime more than the SQL itself. Also restores two clarifying comments that were dropped in the earlier table_refresh_method consolidation. Coverage and assertions are unchanged; classes with project_config_update or whole-project result-count assumptions were kept isolated to avoid cross-test leakage.
axellpadilla
enabled auto-merge
July 27, 2026 03:51
axellpadilla
disabled auto-merge
July 27, 2026 03:52
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
projectfixture(schema create/parse/connect) even when testing independent models — that
setup cost dominates wall-clock time far more than the SQL itself.
project_config_updateconflicts, no whole-project result-count assumptions) into one class per
file/group, using explicit
--models/--selectper test so cases stayisolated. Classes with their own
project_config_updateor that depend onbeing the entire project are kept separate to avoid cross-test leakage.
(verified via AST diff).
Reviewed but left alone (structural blockers, not effort): files subclassing
upstream dbt-tests-adapter base classes (test_utils.py, test_functions.py,
test_hooks.py, test_empty.py), and files where every class hardcodes the same
resource name (test_constraints.py, test_snapshot_configs.py,
test_materialize_change.py, test_test_with.py).
Test plan
tests/functionalsuite (pytest -n auto): 320 passed,48 skipped, 2 xfailed in 5m27s — no regressions