Skip to content

Commit

Permalink
figuring out issue with pytest doing work rather than skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Oct 27, 2023
1 parent 2b649c1 commit b72f466
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/functional/adapter/copy_into/test_copy_into.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def seeds(self):
def models(self):
return {"target.sql": fixtures.target, "schema.yml": fixtures.model_schema}

@pytest.fixture(scope="class")
def path(self, project):
util.run_dbt(["seed"])

Expand Down Expand Up @@ -48,10 +47,8 @@ def copy_into(self, path, args_formatter):
)


# TODO - Rewrite to use external tables (or possibly just delta instead of parquet?) so that we can
# test UC
@pytest.mark.skip_profile("databricks_uc_cluster")
@pytest.mark.skip_profile("databricks_uc_sql_endpoint")
# TODO: figure out a way to test this on UC
@pytest.mark.skip_profile("databricks_uc_cluster", "databricks_uc_sql_endpoint")
class TestCopyInto(BaseCopyInto):
args_formatter = """
target_table: target
Expand All @@ -63,15 +60,13 @@ class TestCopyInto(BaseCopyInto):
mergeSchema: 'true'
"""

def test_copy_into(self, project, path):
def test_copy_into(self, project):
path = self.path(project)
self.copy_into(path, self.args_formatter)
util.check_relations_equal(project.adapter, ["target", "expected_target"])


# TODO - Rewrite to use external tables (or possibly just delta instead of parquet?) so that we can
# test UC
@pytest.mark.skip_profile("databricks_uc_cluster")
@pytest.mark.skip_profile("databricks_uc_sql_endpoint")
@pytest.mark.skip_profile("databricks_uc_cluster", "databricks_uc_sql_endpoint")
class TestCopyIntoWithExpressionList(BaseCopyInto):
args_formatter = """
target_table: target
Expand All @@ -85,5 +80,6 @@ class TestCopyIntoWithExpressionList(BaseCopyInto):
"""

def test_copy_into_with_expression_list(self, project, path):
path = self.path(project)
self.copy_into(path, self.args_formatter)
util.check_relations_equal(project.adapter, ["target", "expected_target_expression_list"])

0 comments on commit b72f466

Please sign in to comment.