Skip to content

Commit d9aff75

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent da45edd commit d9aff75

7 files changed

Lines changed: 24 additions & 52 deletions

File tree

tests/functional/adapter/dbt/test_caching.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ class TestCachingLowercaseModel(BaseCachingLowercaseModel):
1111
pass
1212

1313

14-
@pytest.mark.skip(
15-
reason="""
14+
@pytest.mark.skip(reason="""
1615
Fails because of case sensitivity.
1716
MODEL is coereced to model which fails the test as it sees conflicting naming
18-
"""
19-
)
17+
""")
2018
class TestCachingUppercaseModel(BaseCachingUppercaseModel):
2119
pass
2220

tests/functional/adapter/dbt/test_hooks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ def project_config_update(self):
195195
"models": {
196196
"test": {
197197
"hooked": {
198-
"post-hook": [
199-
"""
198+
"post-hook": ["""
200199
insert into {{this.schema}}.on_model_hook select
201200
test_state,
202201
'{{ target.dbname }}' as target_dbname,
@@ -210,8 +209,7 @@ def project_config_update(self):
210209
'{{ run_started_at }}' as run_started_at,
211210
'{{ invocation_id }}' as invocation_id,
212211
'{{ thread_id }}' as thread_id
213-
from {{ ref('post') }}""".strip()
214-
],
212+
from {{ ref('post') }}""".strip()],
215213
}
216214
},
217215
}

tests/functional/adapter/dbt/test_persist_docs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
from dbt.tests.adapter.persist_docs.test_persist_docs import BasePersistDocs
33

44

5-
@pytest.mark.skip(
6-
reason="""
5+
@pytest.mark.skip(reason="""
76
Persisted docs are not implemented in SQLServer.
87
Could be implemented with sp_addextendedproperty
9-
"""
10-
)
8+
""")
119
class TestPersistDocs(BasePersistDocs):
1210
pass

tests/functional/adapter/dbt/test_relations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ class TestChangeRelationTypeValidator(BaseChangeRelationTypeValidator):
77
pass
88

99

10-
@pytest.mark.xfail(
11-
reason="""
10+
@pytest.mark.xfail(reason="""
1211
Test fails as its not passing Use[] properly.
1312
`Use[None]` is called, should be `User[TestDB]`
1413
Unclear why the macro doens't pass it properly.
15-
"""
16-
)
14+
""")
1715
class TestDropSchemaNamed(BaseDropSchemaNamed):
1816
pass

tests/functional/adapter/dbt/test_simple_seed.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -162,25 +162,21 @@ def test_simple_seed_with_disabled(self, clear_test_schema, project):
162162
check_table_does_not_exist(project.adapter, "seed_disabled")
163163
check_table_does_exist(project.adapter, "seed_tricky")
164164

165-
@pytest.mark.skip(
166-
reason="""
165+
@pytest.mark.skip(reason="""
167166
Running all the tests in the same schema causes the tests to fail
168167
as they all share the same schema across the tests
169-
"""
170-
)
168+
""")
171169
def test_simple_seed_selection(self, clear_test_schema, project):
172170
results = run_dbt(["seed", "--select", "seed_enabled"])
173171
assert len(results) == 1
174172
check_table_does_exist(project.adapter, "seed_enabled")
175173
check_table_does_not_exist(project.adapter, "seed_disabled")
176174
check_table_does_not_exist(project.adapter, "seed_tricky")
177175

178-
@pytest.mark.skip(
179-
reason="""
176+
@pytest.mark.skip(reason="""
180177
Running all the tests in the same schema causes the tests to fail
181178
as they all share the same schema across the tests
182-
"""
183-
)
179+
""")
184180
def test_simple_seed_exclude(self, clear_test_schema, project):
185181
results = run_dbt(["seed", "--exclude", "seed_enabled"])
186182
assert len(results) == 1
@@ -207,12 +203,10 @@ def clear_test_schema(self, project):
207203
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
208204
project.run_sql(f"drop schema if exists {project.test_schema}")
209205

210-
@pytest.mark.skip(
211-
reason="""
206+
@pytest.mark.skip(reason="""
212207
Running all the tests in the same schema causes the tests to fail
213208
as they all share the same schema across the tests
214-
"""
215-
)
209+
""")
216210
def test_simple_seed_with_disabled(self, clear_test_schema, project):
217211
results = run_dbt(["seed"])
218212
assert len(results) == 2
@@ -227,12 +221,10 @@ def test_simple_seed_selection(self, clear_test_schema, project):
227221
check_table_does_not_exist(project.adapter, "seed_disabled")
228222
check_table_does_not_exist(project.adapter, "seed_tricky")
229223

230-
@pytest.mark.skip(
231-
reason="""
224+
@pytest.mark.skip(reason="""
232225
Running all the tests in the same schema causes the tests to fail
233226
as they all share the same schema across the tests
234-
"""
235-
)
227+
""")
236228
def test_simple_seed_exclude(self, clear_test_schema, project):
237229
results = run_dbt(["seed", "--exclude", "seed_enabled"])
238230
assert len(results) == 1
@@ -259,25 +251,21 @@ def clear_test_schema(self, project):
259251
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
260252
project.run_sql(f"drop schema if exists {project.test_schema}")
261253

262-
@pytest.mark.skip(
263-
reason="""
254+
@pytest.mark.skip(reason="""
264255
Running all the tests in the same schema causes the tests to fail
265256
as they all share the same schema across the tests
266-
"""
267-
)
257+
""")
268258
def test_simple_seed_with_disabled(self, clear_test_schema, project):
269259
results = run_dbt(["seed"])
270260
assert len(results) == 2
271261
check_table_does_exist(project.adapter, "seed_enabled")
272262
check_table_does_not_exist(project.adapter, "seed_disabled")
273263
check_table_does_exist(project.adapter, "seed_tricky")
274264

275-
@pytest.mark.skip(
276-
reason="""
265+
@pytest.mark.skip(reason="""
277266
Running all the tests in the same schema causes the tests to fail
278267
as they all share the same schema across the tests
279-
"""
280-
)
268+
""")
281269
def test_simple_seed_selection(self, clear_test_schema, project):
282270
results = run_dbt(["seed", "--select", "seed_enabled"])
283271
assert len(results) == 1

tests/functional/adapter/dbt/test_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,10 @@ class TestStringLiteral(BaseStringLiteral):
349349
pass
350350

351351

352-
@pytest.mark.skip(
353-
reason="""
352+
@pytest.mark.skip(reason="""
354353
comment here about why this is skipped.
355354
https://github.com/dbt-labs/dbt-adapters/blob/f1987d4313cc94bac9906963dff1337ee0bffbc6/dbt/include/global_project/macros/adapters/timestamps.sql#L39
356-
"""
357-
)
355+
""")
358356
class TestCurrentTimestamps(BaseCurrentTimestamps):
359357
pass
360358

tests/functional/adapter/mssql/test_index.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@
105105
)
106106
"""
107107

108-
index_count = (
109-
base_validation
110-
+ """
108+
index_count = base_validation + """
111109
select
112110
index_type,
113111
count(*) index_count
@@ -117,11 +115,8 @@
117115
schema_name='{schema_name}'
118116
group by index_type
119117
"""
120-
)
121118

122-
other_index_count = (
123-
base_validation
124-
+ """
119+
other_index_count = base_validation + """
125120
SELECT
126121
*
127122
FROM
@@ -132,7 +127,6 @@
132127
table_view='{schema_name}.{table_name}'
133128
134129
"""
135-
)
136130

137131

138132
class TestIndex:

0 commit comments

Comments
 (0)