Skip to content

Commit

Permalink
Move munging of "tests" to "data_tests" after dictionary check
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Dec 18, 2024
1 parent 31734af commit 6e8bf35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/dbt/config/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 6e8bf35

Please sign in to comment.