From 9f99ae20fa73ffd36b305623a20db02514a5277b Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Wed, 24 Apr 2024 16:12:09 -0400 Subject: [PATCH] move test_empty from tests/functional/adapter to tests/functional --- tests/functional/adapter/empty/__init__.py | 0 tests/functional/{adapter/empty => }/test_empty.py | 13 ++++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) delete mode 100644 tests/functional/adapter/empty/__init__.py rename tests/functional/{adapter/empty => }/test_empty.py (80%) diff --git a/tests/functional/adapter/empty/__init__.py b/tests/functional/adapter/empty/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/test_empty.py similarity index 80% rename from tests/functional/adapter/empty/test_empty.py rename to tests/functional/test_empty.py index a014a640c1f..8e6e834427f 100644 --- a/tests/functional/adapter/empty/test_empty.py +++ b/tests/functional/test_empty.py @@ -37,7 +37,7 @@ """ -class BaseTestEmpty: +class TestEmptyFlag: @pytest.fixture(scope="class") def seeds(self): return { @@ -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"])