Skip to content

Commit

Permalink
Add a test for various Python models. (#189)
Browse files Browse the repository at this point in the history
### Description

Adds a test for various Python models in dbt-labs/dbt-core#5906.
  • Loading branch information
ueshin authored Sep 23, 2022
1 parent 202611f commit bf8a11e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features
- Support python model through run command API, currently supported materializations are table and incremental. ([dbt-labs/dbt-spark#377](https://github.com/dbt-labs/dbt-spark/pull/377), [#126](https://github.com/databricks/dbt-databricks/pull/126))
- Enable Pandas and Pandas-on-Spark DataFrames for dbt python models ([dbt-labs/dbt-spark#469](https://github.com/dbt-labs/dbt-spark/pull/469), [#181](https://github.com/databricks/dbt-databricks/pull/181))
- Implement testing for a test for various Python models ([#189](https://github.com/databricks/dbt-databricks/pull/189))
- Implement testing for `type_boolean` in Databricks ([dbt-labs/dbt-spark#471](https://github.com/dbt-labs/dbt-spark/pull/471), [#188](https://github.com/databricks/dbt-databricks/pull/188))

### Under the hood
Expand Down
6 changes: 6 additions & 0 deletions tests/functional/adapter/test_python_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
BasePythonIncrementalTests,
BasePythonModelTests,
)
from dbt.tests.adapter.python_model.test_spark import BasePySparkTests


@pytest.mark.skip_profile("databricks_sql_endpoint", "databricks_uc_sql_endpoint")
Expand Down Expand Up @@ -64,3 +65,8 @@ def test_changing_schema_with_log_validation(self, project, logs_dir):
assert "On model.test.simple_python_model:" in log
assert "spark.createDataFrame(data, schema=['test1', 'test3'])" in log
assert "Execution status: OK in" in log


@pytest.mark.skip_profile("databricks_sql_endpoint", "databricks_uc_sql_endpoint")
class TestPySparkDatabricks(BasePySparkTests):
pass

0 comments on commit bf8a11e

Please sign in to comment.