Skip to content

Commit

Permalink
TestSparkUnitTestingTypes - primative types
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Feb 9, 2024
1 parent 688baa6 commit 0b37836
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# install latest changes in dbt-core
# TODO: how to automate switching from develop to version branches?
git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-adapters.git@unit-testing-case-insensitive-comparisons
git+https://github.com/dbt-labs/dbt-adapters.git@unit-testing-case-insensitive-comparisons#subdirectory=dbt-tests-adapter
git+https://github.com/dbt-labs/dbt-adapters.git
git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
Expand Down
21 changes: 21 additions & 0 deletions tests/functional/adapter/unit_testing/test_unit_testing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
import pytest

from dbt.tests.adapter.unit_testing.test_types import BaseUnitTestingTypes
from dbt.tests.adapter.unit_testing.test_case_insensitivity import BaseUnitTestCaseInsensivity
from dbt.tests.adapter.unit_testing.test_invalid_input import BaseUnitTestInvalidInput


class TestSparkUnitTestingTypes(BaseUnitTestingTypes):
@pytest.fixture
def data_types(self):
# sql_value, yaml_value
return [
["1", "1"],
["2.0", "2.0"],
["'12345'", "12345"],
["'string'", "string"],
["true", "true"],
["date '2011-11-11'", "2011-11-11"],
["timestamp '2013-11-03 00:00:00-0'", "2013-11-03 00:00:00-0"],
# ["map(struct('Hello', 'World'), 'Greeting')", '''"map(struct('Hello', 'World'), 'Greeting')"'''],
# ['named_struct("a", 1, "b", 2, "c", 3)', """'named_struct("a", 1, "b", 2, "c", 3)'"""],
# ["array(1, 2, 3)", "'array(1, 2, 3)'"],
]


class TestSparkUnitTestCaseInsensitivity(BaseUnitTestCaseInsensivity):
pass

Expand Down

0 comments on commit 0b37836

Please sign in to comment.