Skip to content

Commit 5f83b92

Browse files
committed
chore: make style code format
1 parent 1725799 commit 5f83b92

1 file changed

Lines changed: 10 additions & 30 deletions

File tree

tests/web/test_main.py

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ def test_rename_file(client: TestClient, project_tmp_path: Path) -> None:
149149
assert not txt_file.exists()
150150

151151

152-
def test_rename_file_and_keep_content(
153-
client: TestClient, project_tmp_path: Path
154-
) -> None:
152+
def test_rename_file_and_keep_content(client: TestClient, project_tmp_path: Path) -> None:
155153
txt_file = project_tmp_path / "foo.txt"
156154
txt_file.write_text("bar")
157155

@@ -192,9 +190,7 @@ def test_rename_file_already_exists(client: TestClient, project_tmp_path: Path)
192190
assert not foo_file.exists()
193191

194192

195-
def test_rename_file_to_existing_directory(
196-
client: TestClient, project_tmp_path: Path
197-
) -> None:
193+
def test_rename_file_to_existing_directory(client: TestClient, project_tmp_path: Path) -> None:
198194
foo_file = project_tmp_path / "foo.txt"
199195
foo_file.touch()
200196
existing_dir = project_tmp_path / "existing_dir"
@@ -236,9 +232,7 @@ def test_create_directory(client: TestClient, project_tmp_path: Path) -> None:
236232
}
237233

238234

239-
def test_create_directory_already_exists(
240-
client: TestClient, project_tmp_path: Path
241-
) -> None:
235+
def test_create_directory_already_exists(client: TestClient, project_tmp_path: Path) -> None:
242236
new_dir = project_tmp_path / "new_dir"
243237
new_dir.mkdir()
244238

@@ -263,9 +257,7 @@ def test_rename_directory(client: TestClient, project_tmp_path: Path) -> None:
263257
}
264258

265259

266-
def test_rename_directory_already_exists_empty(
267-
client: TestClient, project_tmp_path: Path
268-
) -> None:
260+
def test_rename_directory_already_exists_empty(client: TestClient, project_tmp_path: Path) -> None:
269261
new_dir = project_tmp_path / "new_dir"
270262
new_dir.mkdir()
271263
existing_dir = project_tmp_path / "renamed_dir"
@@ -299,9 +291,7 @@ def test_rename_directory_already_exists_not_empty(
299291
assert new_dir.exists()
300292

301293

302-
def test_rename_directory_to_existing_file(
303-
client: TestClient, project_tmp_path: Path
304-
) -> None:
294+
def test_rename_directory_to_existing_file(client: TestClient, project_tmp_path: Path) -> None:
305295
new_dir = project_tmp_path / "new_dir"
306296
new_dir.mkdir()
307297
existing_file = project_tmp_path / "foo.txt"
@@ -327,9 +317,7 @@ def test_delete_directory_not_found(client: TestClient, project_tmp_path: Path)
327317
assert response.status_code == 404
328318

329319

330-
def test_delete_directory_not_a_directory(
331-
client: TestClient, project_tmp_path: Path
332-
) -> None:
320+
def test_delete_directory_not_a_directory(client: TestClient, project_tmp_path: Path) -> None:
333321
txt_file = project_tmp_path / "foo.txt"
334322
txt_file.touch()
335323

@@ -393,9 +381,7 @@ def test_plan_test_failures(
393381
async def test_cancel(client: TestClient) -> None:
394382
client.app.state.circuit_breaker = threading.Event() # type: ignore
395383
transport = ASGITransport(client.app) # type: ignore
396-
async with AsyncClient(
397-
transport=transport, base_url="http://testserver"
398-
) as _client:
384+
async with AsyncClient(transport=transport, base_url="http://testserver") as _client:
399385
await _client.post("/api/plan", json={"environment": "dev"})
400386
response = await _client.post("/api/plan/cancel")
401387
assert response.status_code == 204
@@ -440,9 +426,7 @@ def test_modules(client: TestClient) -> None:
440426

441427

442428
def test_fetchdf(client: TestClient, web_sushi_context: Context) -> None:
443-
response = client.post(
444-
"/api/commands/fetchdf", json={"sql": "SELECT * from sushi.top_waiters"}
445-
)
429+
response = client.post("/api/commands/fetchdf", json={"sql": "SELECT * from sushi.top_waiters"})
446430
assert response.status_code == 200
447431
with pa.ipc.open_stream(response.content) as reader:
448432
df = reader.read_pandas()
@@ -510,9 +494,7 @@ def test_get_environments(client: TestClient, project_context: Context) -> None:
510494
plan_id="",
511495
suffix_target="schema",
512496
)
513-
assert response_json["pinned_environments"] == list(
514-
project_context.config.pinned_environments
515-
)
497+
assert response_json["pinned_environments"] == list(project_context.config.pinned_environments)
516498
assert (
517499
response_json["default_target_environment"]
518500
== project_context.config.default_target_environment
@@ -568,9 +550,7 @@ def test_test(client: TestClient, web_sushi_context: Context) -> None:
568550
assert response_json["failures"] == []
569551

570552
# Single test
571-
response = client.get(
572-
"/api/commands/test", params={"test": "tests/test_order_items.yaml"}
573-
)
553+
response = client.get("/api/commands/test", params={"test": "tests/test_order_items.yaml"})
574554
assert response.status_code == 200
575555
response_json = response.json()
576556
assert response_json["tests_run"] == 1

0 commit comments

Comments
 (0)