From 6e8bf351e79ab3efac60d3e7b184dc8651f610c2 Mon Sep 17 00:00:00 2001 From: Gerda Shank Date: Wed, 18 Dec 2024 16:16:26 -0500 Subject: [PATCH] Move munging of "tests" to "data_tests" after dictionary check --- core/dbt/config/project.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/dbt/config/project.py b/core/dbt/config/project.py index bd8eca095f8..b3b7378dc37 100644 --- a/core/dbt/config/project.py +++ b/core/dbt/config/project.py @@ -195,12 +195,13 @@ def load_raw_project(project_root: str) -> Dict[str, Any]: ) project_dict = _load_yaml(project_yaml_filepath) - if "tests" in project_dict: - project_dict["data_tests"] = project_dict.pop("tests") if not isinstance(project_dict, dict): raise DbtProjectError(f"{DBT_PROJECT_FILE_NAME} does not parse to a dictionary") + if "tests" in project_dict: + project_dict["data_tests"] = project_dict.pop("tests") + return project_dict