Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3.10
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-yaml
args:
Expand All @@ -21,7 +21,7 @@ repos:
- id: mixed-line-ending
- id: check-docstring-first
- repo: 'https://github.com/adrienverge/yamllint'
rev: v1.35.1
rev: v1.38.0
hooks:
- id: yamllint
args:
Expand All @@ -32,13 +32,13 @@ repos:
hooks:
- id: absolufy-imports
- repo: 'https://github.com/hadialqattan/pycln'
rev: v2.5.0
rev: v2.6.0
hooks:
- id: pycln
args:
- '--all'
- repo: 'https://github.com/pycqa/isort'
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args:
Expand All @@ -50,7 +50,7 @@ repos:
- '--python-version'
- '39'
- repo: 'https://github.com/psf/black'
rev: 24.8.0
rev: 26.1.0
hooks:
- id: black
args:
Expand All @@ -66,7 +66,7 @@ repos:
- '--check'
- '--diff'
- repo: 'https://github.com/pycqa/flake8'
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
args:
Expand All @@ -78,7 +78,7 @@ repos:
stages:
- manual
- repo: 'https://github.com/pre-commit/mirrors-mypy'
rev: v1.11.1
rev: v1.19.1
hooks:
- id: mypy
args:
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/adapter/dbt/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ class TestCachingLowercaseModel(BaseCachingLowercaseModel):
pass


@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Fails because of case sensitivity.
MODEL is coereced to model which fails the test as it sees conflicting naming
"""
)
""")
class TestCachingUppercaseModel(BaseCachingUppercaseModel):
pass

Expand Down
6 changes: 2 additions & 4 deletions tests/functional/adapter/dbt/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ def project_config_update(self):
"models": {
"test": {
"hooked": {
"post-hook": [
"""
"post-hook": ["""
insert into {{this.schema}}.on_model_hook select
test_state,
'{{ target.dbname }}' as target_dbname,
Expand All @@ -210,8 +209,7 @@ def project_config_update(self):
'{{ run_started_at }}' as run_started_at,
'{{ invocation_id }}' as invocation_id,
'{{ thread_id }}' as thread_id
from {{ ref('post') }}""".strip()
],
from {{ ref('post') }}""".strip()],
}
},
}
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/adapter/dbt/test_persist_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
from dbt.tests.adapter.persist_docs.test_persist_docs import BasePersistDocs


@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Persisted docs are not implemented in SQLServer.
Could be implemented with sp_addextendedproperty
"""
)
""")
class TestPersistDocs(BasePersistDocs):
pass
6 changes: 2 additions & 4 deletions tests/functional/adapter/dbt/test_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ class TestChangeRelationTypeValidator(BaseChangeRelationTypeValidator):
pass


@pytest.mark.xfail(
reason="""
@pytest.mark.xfail(reason="""
Test fails as its not passing Use[] properly.
`Use[None]` is called, should be `User[TestDB]`
Unclear why the macro doens't pass it properly.
"""
)
""")
class TestDropSchemaNamed(BaseDropSchemaNamed):
pass
36 changes: 12 additions & 24 deletions tests/functional/adapter/dbt/test_simple_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,21 @@ def test_simple_seed_with_disabled(self, clear_test_schema, project):
check_table_does_not_exist(project.adapter, "seed_disabled")
check_table_does_exist(project.adapter, "seed_tricky")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_selection(self, clear_test_schema, project):
results = run_dbt(["seed", "--select", "seed_enabled"])
assert len(results) == 1
check_table_does_exist(project.adapter, "seed_enabled")
check_table_does_not_exist(project.adapter, "seed_disabled")
check_table_does_not_exist(project.adapter, "seed_tricky")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_exclude(self, clear_test_schema, project):
results = run_dbt(["seed", "--exclude", "seed_enabled"])
assert len(results) == 1
Expand All @@ -207,12 +203,10 @@ def clear_test_schema(self, project):
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
project.run_sql(f"drop schema if exists {project.test_schema}")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_with_disabled(self, clear_test_schema, project):
results = run_dbt(["seed"])
assert len(results) == 2
Expand All @@ -227,12 +221,10 @@ def test_simple_seed_selection(self, clear_test_schema, project):
check_table_does_not_exist(project.adapter, "seed_disabled")
check_table_does_not_exist(project.adapter, "seed_tricky")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_exclude(self, clear_test_schema, project):
results = run_dbt(["seed", "--exclude", "seed_enabled"])
assert len(results) == 1
Expand All @@ -259,25 +251,21 @@ def clear_test_schema(self, project):
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
project.run_sql(f"drop schema if exists {project.test_schema}")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_with_disabled(self, clear_test_schema, project):
results = run_dbt(["seed"])
assert len(results) == 2
check_table_does_exist(project.adapter, "seed_enabled")
check_table_does_not_exist(project.adapter, "seed_disabled")
check_table_does_exist(project.adapter, "seed_tricky")

@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
Running all the tests in the same schema causes the tests to fail
as they all share the same schema across the tests
"""
)
""")
def test_simple_seed_selection(self, clear_test_schema, project):
results = run_dbt(["seed", "--select", "seed_enabled"])
assert len(results) == 1
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/adapter/dbt/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,10 @@ class TestStringLiteral(BaseStringLiteral):
pass


@pytest.mark.skip(
reason="""
@pytest.mark.skip(reason="""
comment here about why this is skipped.
https://github.com/dbt-labs/dbt-adapters/blob/f1987d4313cc94bac9906963dff1337ee0bffbc6/dbt/include/global_project/macros/adapters/timestamps.sql#L39
"""
)
""")
class TestCurrentTimestamps(BaseCurrentTimestamps):
pass

Expand Down
10 changes: 2 additions & 8 deletions tests/functional/adapter/mssql/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@
)
"""

index_count = (
base_validation
+ """
index_count = base_validation + """
select
index_type,
count(*) index_count
Expand All @@ -117,11 +115,8 @@
schema_name='{schema_name}'
group by index_type
"""
)

other_index_count = (
base_validation
+ """
other_index_count = base_validation + """
SELECT
*
FROM
Expand All @@ -132,7 +127,6 @@
table_view='{schema_name}.{table_name}'

"""
)


class TestIndex:
Expand Down
Loading