From d262cdf4983367558352aa764a13f66615ce3a5f Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Fri, 7 Feb 2025 11:20:26 -0500 Subject: [PATCH 1/2] quick functional test on doc_blocks issue --- tests/functional/docs/test_model_version_docs_blocks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/docs/test_model_version_docs_blocks.py b/tests/functional/docs/test_model_version_docs_blocks.py index 335ef8e8937..5670e10b7fc 100644 --- a/tests/functional/docs/test_model_version_docs_blocks.py +++ b/tests/functional/docs/test_model_version_docs_blocks.py @@ -48,6 +48,10 @@ - v: 2 columns: - name: other_id + - name: test_model + columns: + - name: test + doc_blocks: 2 """ @@ -55,6 +59,7 @@ class TestVersionedModelDocsBlock: @pytest.fixture(scope="class") def models(self): return { + "test_model.sql": "select 1 as fun", "model_1.sql": model_1, "model_versioned.sql": model_versioned, "schema.yml": schema_yml, From cb99327bd391f2871859b802cb4a22fc1115d98f Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Fri, 7 Feb 2025 11:27:26 -0500 Subject: [PATCH 2/2] separate test --- .../docs/test_doc_blocks_backcompat.py | 23 +++++++++++++++++++ .../docs/test_model_version_docs_blocks.py | 5 ---- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 tests/functional/docs/test_doc_blocks_backcompat.py diff --git a/tests/functional/docs/test_doc_blocks_backcompat.py b/tests/functional/docs/test_doc_blocks_backcompat.py new file mode 100644 index 00000000000..90aecb5c232 --- /dev/null +++ b/tests/functional/docs/test_doc_blocks_backcompat.py @@ -0,0 +1,23 @@ +import pytest + +from dbt.tests.util import run_dbt + +schema_yml = """ +models: + - name: test_model + columns: + - name: test + doc_blocks: 2 +""" + + +class TestDocBlocksBackCompat: + @pytest.fixture(scope="class") + def models(self): + return { + "test_model.sql": "select 1 as fun", + "schema.yml": schema_yml, + } + + def test_doc_blocks_back_compat(self, project): + run_dbt(["parse"]) diff --git a/tests/functional/docs/test_model_version_docs_blocks.py b/tests/functional/docs/test_model_version_docs_blocks.py index 5670e10b7fc..335ef8e8937 100644 --- a/tests/functional/docs/test_model_version_docs_blocks.py +++ b/tests/functional/docs/test_model_version_docs_blocks.py @@ -48,10 +48,6 @@ - v: 2 columns: - name: other_id - - name: test_model - columns: - - name: test - doc_blocks: 2 """ @@ -59,7 +55,6 @@ class TestVersionedModelDocsBlock: @pytest.fixture(scope="class") def models(self): return { - "test_model.sql": "select 1 as fun", "model_1.sql": model_1, "model_versioned.sql": model_versioned, "schema.yml": schema_yml,