-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mp/reformat the repo to precommit hooks (#562)
* Clean up code and get mypy passing * Remove references to pytest --------- Co-authored-by: Mila Page <[email protected]>
- Loading branch information
1 parent
f4f020c
commit 08728d8
Showing
41 changed files
with
948 additions
and
845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 4 additions & 10 deletions
14
tests/functional/adapter/column_types/test_column_types.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
import pytest | ||
from dbt.tests.adapter.column_types.test_column_types import BaseColumnTypes | ||
from tests.functional.adapter.column_types.fixtures import ( | ||
_MODEL_SQL, | ||
_SCHEMA_YML | ||
) | ||
from tests.functional.adapter.column_types.fixtures import _MODEL_SQL, _SCHEMA_YML | ||
|
||
class TestSnowflakeColumnTypes(BaseColumnTypes): | ||
|
||
class TestSnowflakeColumnTypes(BaseColumnTypes): | ||
@pytest.fixture(scope="class") | ||
def models(self): | ||
return { | ||
"model.sql": _MODEL_SQL, | ||
"schema.yml": _SCHEMA_YML | ||
} | ||
return {"model.sql": _MODEL_SQL, "schema.yml": _SCHEMA_YML} | ||
|
||
def test_run_and_test(self, project): | ||
self.run_and_test() | ||
self.run_and_test() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
from dbt.tests.util import AnyString, AnyFloat | ||
|
||
|
||
def snowflake_stats(): | ||
return { | ||
'has_stats': { | ||
'id': 'has_stats', | ||
'label': 'Has Stats?', | ||
'value': True, | ||
'description': 'Indicates whether there are statistics for this table', | ||
'include': False, | ||
"has_stats": { | ||
"id": "has_stats", | ||
"label": "Has Stats?", | ||
"value": True, | ||
"description": "Indicates whether there are statistics for this table", | ||
"include": False, | ||
}, | ||
"bytes": { | ||
"id": "bytes", | ||
"label": "Approximate Size", | ||
"value": AnyFloat(), | ||
"description": "Approximate size of the table as reported by Snowflake", | ||
"include": True, | ||
}, | ||
'bytes': { | ||
'id': 'bytes', | ||
'label': 'Approximate Size', | ||
'value': AnyFloat(), | ||
'description': 'Approximate size of the table as reported by Snowflake', | ||
'include': True, | ||
"last_modified": { | ||
"id": "last_modified", | ||
"label": "Last Modified", | ||
"value": AnyString(), | ||
"description": "The timestamp for last update/change", | ||
"include": True, | ||
}, | ||
'last_modified': { | ||
'id': 'last_modified', | ||
'label': 'Last Modified', | ||
'value': AnyString(), | ||
'description': 'The timestamp for last update/change', | ||
'include': True, | ||
"row_count": { | ||
"id": "row_count", | ||
"label": "Row Count", | ||
"value": 1.0, | ||
"description": "An approximate count of rows in this table", | ||
"include": True, | ||
}, | ||
'row_count': { | ||
'id': 'row_count', | ||
'label': 'Row Count', | ||
'value': 1.0, | ||
'description': 'An approximate count of rows in this table', | ||
'include': True, | ||
} | ||
} |
5 changes: 3 additions & 2 deletions
5
tests/functional/adapter/incremental/test_incremental_merge_exclude_columns.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import pytest | ||
from dbt.tests.adapter.incremental.test_incremental_merge_exclude_columns import ( | ||
BaseMergeExcludeColumns, | ||
) | ||
|
||
from dbt.tests.adapter.incremental.test_incremental_merge_exclude_columns import BaseMergeExcludeColumns | ||
|
||
class TestMergeExcludeColumns(BaseMergeExcludeColumns): | ||
pass |
5 changes: 4 additions & 1 deletion
5
tests/functional/adapter/incremental/test_incremental_on_schema_change.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
from dbt.tests.adapter.incremental.test_incremental_on_schema_change import BaseIncrementalOnSchemaChange | ||
from dbt.tests.adapter.incremental.test_incremental_on_schema_change import ( | ||
BaseIncrementalOnSchemaChange, | ||
) | ||
|
||
|
||
class TestIncrementalOnSchemaChange(BaseIncrementalOnSchemaChange): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
tests/functional/adapter/incremental/test_incremental_run_result.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.