Skip to content

Commit feef19b

Browse files
pre-commit-ci[bot]axellpadilla
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9c90060 commit feef19b

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
@@ -12,12 +12,10 @@ class TestCachingLowercaseModel(BaseCachingLowercaseModel):
1212
pass
1313

1414

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

tests/functional/adapter/dbt/test_hooks.py

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

tests/functional/adapter/dbt/test_persist_docs.py

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

55

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

tests/functional/adapter/dbt/test_relations.py

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

1010

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

tests/functional/adapter/dbt/test_simple_seed.py

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

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

179-
@pytest.mark.skip(
180-
reason="""
177+
@pytest.mark.skip(reason="""
181178
Running all the tests in the same schema causes the tests to fail
182179
as they all share the same schema across the tests
183-
"""
184-
)
180+
""")
185181
def test_simple_seed_exclude(self, clear_test_schema, project):
186182
results = run_dbt(["seed", "--exclude", "seed_enabled"])
187183
assert len(results) == 1
@@ -208,12 +204,10 @@ def clear_test_schema(self, project):
208204
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
209205
project.run_sql(f"drop schema if exists {project.test_schema}")
210206

211-
@pytest.mark.skip(
212-
reason="""
207+
@pytest.mark.skip(reason="""
213208
Running all the tests in the same schema causes the tests to fail
214209
as they all share the same schema across the tests
215-
"""
216-
)
210+
""")
217211
def test_simple_seed_with_disabled(self, clear_test_schema, project):
218212
results = run_dbt(["seed"])
219213
assert len(results) == 2
@@ -228,12 +222,10 @@ def test_simple_seed_selection(self, clear_test_schema, project):
228222
check_table_does_not_exist(project.adapter, "seed_disabled")
229223
check_table_does_not_exist(project.adapter, "seed_tricky")
230224

231-
@pytest.mark.skip(
232-
reason="""
225+
@pytest.mark.skip(reason="""
233226
Running all the tests in the same schema causes the tests to fail
234227
as they all share the same schema across the tests
235-
"""
236-
)
228+
""")
237229
def test_simple_seed_exclude(self, clear_test_schema, project):
238230
results = run_dbt(["seed", "--exclude", "seed_enabled"])
239231
assert len(results) == 1
@@ -260,25 +252,21 @@ def clear_test_schema(self, project):
260252
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
261253
project.run_sql(f"drop schema if exists {project.test_schema}")
262254

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

276-
@pytest.mark.skip(
277-
reason="""
266+
@pytest.mark.skip(reason="""
278267
Running all the tests in the same schema causes the tests to fail
279268
as they all share the same schema across the tests
280-
"""
281-
)
269+
""")
282270
def test_simple_seed_selection(self, clear_test_schema, project):
283271
results = run_dbt(["seed", "--select", "seed_enabled"])
284272
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
@@ -364,12 +364,10 @@ class TestStringLiteral(BaseStringLiteral):
364364
pass
365365

366366

367-
@pytest.mark.skip(
368-
reason="""
367+
@pytest.mark.skip(reason="""
369368
comment here about why this is skipped.
370369
https://github.com/dbt-labs/dbt-adapters/blob/f1987d4313cc94bac9906963dff1337ee0bffbc6/dbt/include/global_project/macros/adapters/timestamps.sql#L39
371-
"""
372-
)
370+
""")
373371
class TestCurrentTimestamps(BaseCurrentTimestamps):
374372
pass
375373

tests/functional/adapter/mssql/test_index.py

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

109-
index_count = (
110-
base_validation
111-
+ """
109+
index_count = base_validation + """
112110
select
113111
index_type,
114112
count(*) index_count
@@ -118,11 +116,8 @@
118116
schema_name='{schema_name}'
119117
group by index_type
120118
"""
121-
)
122119

123-
other_index_count = (
124-
base_validation
125-
+ """
120+
other_index_count = base_validation + """
126121
SELECT
127122
*
128123
FROM
@@ -133,7 +128,6 @@
133128
table_view='{schema_name}.{table_name}'
134129
135130
"""
136-
)
137131

138132

139133
class TestIndex:

0 commit comments

Comments
 (0)