-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new test framework for dbt-core 1.1.x (#16)
- Loading branch information
1 parent
93d1e1d
commit f370287
Showing
7 changed files
with
92 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = '1.0.1' | ||
version = '1.1.0' |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[pytest] | ||
filterwarnings = | ||
ignore:.*'soft_unicode' has been renamed to 'soft_str'*:DeprecationWarning | ||
ignore:unclosed file .*:ResourceWarning | ||
env_files = | ||
test.env # uses pytest-dotenv plugin | ||
# this allows you to store env vars for database connection in a file named test.env | ||
# rather than passing them in every CLI command, or setting in `PYTEST_ADDOPTS` | ||
# be sure to add "test.env" to .gitignore as well! | ||
testpaths = | ||
tests/functional # name per convention |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
import os | ||
|
||
# Import the standard functional fixtures as a plugin | ||
# Note: fixtures with session scope need to be local | ||
pytest_plugins = ["dbt.tests.fixtures.project"] | ||
|
||
# The profile dictionary, used to write out profiles.yml | ||
# dbt will supply a unique schema per test, so we do not specify 'schema' here | ||
@pytest.fixture(scope="class") | ||
def dbt_profile_target(): | ||
return { | ||
'type': 'sqlite', | ||
'threads': 1, | ||
'database': 'adapter_test', | ||
'schema': 'main', | ||
'schemas_and_paths': { | ||
'main': '/tmp/dbt-sqlite-tests/adapter_test.db' | ||
}, | ||
'schema_directory': '/tmp/dbt-sqlite-tests', | ||
'extensions' : [ | ||
"/tmp/dbt-sqlite-tests/crypto.so" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import pytest | ||
|
||
from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations | ||
from dbt.tests.adapter.basic.test_singular_tests import BaseSingularTests | ||
from dbt.tests.adapter.basic.test_singular_tests_ephemeral import BaseSingularTestsEphemeral | ||
from dbt.tests.adapter.basic.test_empty import BaseEmpty | ||
from dbt.tests.adapter.basic.test_ephemeral import BaseEphemeral | ||
from dbt.tests.adapter.basic.test_incremental import BaseIncremental | ||
from dbt.tests.adapter.basic.test_generic_tests import BaseGenericTests | ||
from dbt.tests.adapter.basic.test_snapshot_check_cols import BaseSnapshotCheckCols | ||
from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp | ||
from dbt.tests.adapter.basic.test_adapter_methods import BaseAdapterMethod | ||
|
||
class TestSimpleMaterializationsSqlite(BaseSimpleMaterializations): | ||
pass | ||
|
||
|
||
class TestSingularTestsSqlite(BaseSingularTests): | ||
pass | ||
|
||
|
||
class TestSingularTestsEphemeralSqlite(BaseSingularTestsEphemeral): | ||
pass | ||
|
||
|
||
class TestEmptySqlite(BaseEmpty): | ||
pass | ||
|
||
|
||
class TestEphemeralSqlite(BaseEphemeral): | ||
pass | ||
|
||
|
||
class TestIncrementalSqlite(BaseIncremental): | ||
pass | ||
|
||
|
||
class TestGenericTestsSqlite(BaseGenericTests): | ||
pass | ||
|
||
|
||
class TestSnapshotCheckColsSqlite(BaseSnapshotCheckCols): | ||
pass | ||
|
||
|
||
class TestSnapshotTimestampSqlite(BaseSnapshotTimestamp): | ||
pass | ||
|
||
|
||
class TestBaseAdapterMethod(BaseAdapterMethod): | ||
pass |