diff --git a/tests/functional/docs/test_generate.py b/tests/functional/docs/test_generate.py index 566fb1a9912..2fd8c14b4b3 100644 --- a/tests/functional/docs/test_generate.py +++ b/tests/functional/docs/test_generate.py @@ -1,9 +1,18 @@ -import os +import pytest -from dbt.tests.util import run_dbt +from dbt.tests.util import run_dbt, get_manifest class TestGenerate: - def test_generate_no_manifest_on_no_compile(self, project): + @pytest.fixture(scope="class") + def models(self): + return {"my_model.sql": "select 1 as fun"} + + def test_manifest_not_compiled(self, project): run_dbt(["docs", "generate", "--no-compile"]) - assert not os.path.exists("./target/manifest.json") + # manifest.json is written out in parsing now, but it + # shouldn't be compiled because of the --no-compile flag + manifest = get_manifest(project.project_root) + model_id = "model.test.my_model" + assert model_id in manifest.nodes + assert manifest.nodes[model_id].compiled is False