Skip to content

Commit

Permalink
additional tests for 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Oct 26, 2023
1 parent 5d53855 commit a648131
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_date_spine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_date_spine import BaseDateSpine


class TestDatabricksDateSpine(BaseDateSpine):
pass
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_generate_series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_generate_series import BaseGenerateSeries


class TestDatabricksGenerateSeries(BaseGenerateSeries):
pass
22 changes: 22 additions & 0 deletions tests/functional/adapter/test_get_intervals_between.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from dbt.tests.adapter.utils.test_get_intervals_between import BaseGetIntervalsBetween
from dbt.tests.adapter.utils.fixture_get_intervals_between import (
models__test_get_intervals_between_yml,
)
import pytest


class TestDatabricksGetIntervalBetween(BaseGetIntervalsBetween):
model_sql = """
SELECT
{{ get_intervals_between('"2023-09-01"', '"2023-09-12"', "day") }} as intervals,
11 as expected
"""

@pytest.fixture(scope="class")
def models(self):
return {
"test_get_intervals_between.yml": models__test_get_intervals_between_yml,
"test_get_intervals_between.sql": self.interpolate_macro_namespace(
self.model_sql, "get_intervals_between"
),
}
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_get_powers_of_two.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_get_powers_of_two import BaseGetPowersOfTwo


class TestDatabricksGetPowersOfTwo(BaseGetPowersOfTwo):
pass
9 changes: 9 additions & 0 deletions tests/functional/adapter/test_show.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from dbt.tests.adapter.dbt_show.test_dbt_show import BaseShowLimit, BaseShowSqlHeader


class TestShowLimitDatabricks(BaseShowLimit):
pass


class TestShowSqlHeaderDatabricks(BaseShowSqlHeader):
pass
34 changes: 34 additions & 0 deletions tests/functional/adapter/test_store_failures_as.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from dbt.tests.adapter.store_test_failures_tests.basic import (
StoreTestFailuresAsInteractions,
StoreTestFailuresAsProjectLevelOff,
StoreTestFailuresAsProjectLevelView,
StoreTestFailuresAsProjectLevelEphemeral,
StoreTestFailuresAsGeneric,
StoreTestFailuresAsExceptions,
)


class TestDatabricksStoreTestFailuresAsInteractions(StoreTestFailuresAsInteractions):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelOff(StoreTestFailuresAsProjectLevelOff):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelView(StoreTestFailuresAsProjectLevelView):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelEphemeral(
StoreTestFailuresAsProjectLevelEphemeral
):
pass


class TestDatabricksStoreTestFailuresAsGeneric(StoreTestFailuresAsGeneric):
pass


class TestDatabricksStoreTestFailuresAsExceptions(StoreTestFailuresAsExceptions):
pass

0 comments on commit a648131

Please sign in to comment.