Skip to content

Commit

Permalink
restructure portable partial parsing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Oct 9, 2023
1 parent 55789a7 commit bb92c04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/functional/partial_parsing/test_partial_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def test_pp_external_models(
assert len(manifest.external_node_unique_ids) == 4


class TestPortablePartialParsing:
class TestPortablePartialParsingBase:
@pytest.fixture(scope="class")
def models(self):
return {
Expand Down Expand Up @@ -903,12 +903,16 @@ def initial_run_and_rename_project_dir(self, project, local_dependency_files):
yield
self.rename_project_root(project, initial_project_root)


class TestPortablePartialParsingUnchangedProject(TestPortablePartialParsingBase):
def test_pp_renamed_project_dir_unchanged_project_contents(self, project):
# partial parse same project in new absolute dir location, using partial_parse.msgpack created in previous dir
run_dbt(["deps"])
assert len(run_dbt(["--partial-parse", "seed"])) == 1
assert len(run_dbt(["--partial-parse", "run"])) == 2


class TestPortablePartialParsingChangedProject(TestPortablePartialParsingBase):
def test_pp_renamed_project_dir_changed_project_contents(self, project):
write_file(model_two_sql, project.project_root, "models", "model_two.sql")

Expand Down

0 comments on commit bb92c04

Please sign in to comment.