Skip to content

Commit

Permalink
Update test_generate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Apr 5, 2023
1 parent 32aa330 commit 57948f4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/functional/docs/test_generate.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 57948f4

Please sign in to comment.