-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |