Skip to content

Commit

Permalink
move test_empty from tests/functional/adapter to tests/functional
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Apr 24, 2024
1 parent 9727872 commit 9f99ae2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"""


class BaseTestEmpty:
class TestEmptyFlag:
@pytest.fixture(scope="class")
def seeds(self):
return {
Expand Down Expand Up @@ -70,6 +70,13 @@ def test_run_with_empty(self, project):
run_dbt(["run", "--empty"])
self.assert_row_count(project, "model", 0)

# build without empty - 3 expected rows in output - 1 from each input
run_dbt(["build"])
self.assert_row_count(project, "model", 3)

# build with empty - 0 expected rows in output
run_dbt(["build", "--empty"])
self.assert_row_count(project, "model", 0)

class TestEmpty(BaseTestEmpty):
pass
# ensure dbt compile supports --empty flag
run_dbt(["compile", "--empty"])

0 comments on commit 9f99ae2

Please sign in to comment.