From cb0c5f89afdc062531bf68ab471c141d2ac57f0d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:13:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_warn_background_tasks_overwritten.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/test_warn_background_tasks_overwritten.py b/tests/test_warn_background_tasks_overwritten.py index e90b79352a..f1116f14ef 100644 --- a/tests/test_warn_background_tasks_overwritten.py +++ b/tests/test_warn_background_tasks_overwritten.py @@ -33,9 +33,7 @@ def test_warn_when_response_background_overwrites_injected_tasks(): resp = client.get("/") assert resp.status_code == 200 - bg_warnings = [ - w for w in caught if "background" in str(w.message).lower() - ] + bg_warnings = [w for w in caught if "background" in str(w.message).lower()] assert len(bg_warnings) == 1 assert issubclass(bg_warnings[0].category, UserWarning) @@ -61,9 +59,7 @@ def test_no_warn_when_response_has_no_background(): resp = client.get("/") assert resp.status_code == 200 - bg_warnings = [ - w for w in caught if "background" in str(w.message).lower() - ] + bg_warnings = [w for w in caught if "background" in str(w.message).lower()] assert len(bg_warnings) == 0 # The injected task should have run assert executed == [True] @@ -89,8 +85,6 @@ def test_no_warn_when_no_injected_background_tasks(): resp = client.get("/") assert resp.status_code == 200 - bg_warnings = [ - w for w in caught if "background" in str(w.message).lower() - ] + bg_warnings = [w for w in caught if "background" in str(w.message).lower()] assert len(bg_warnings) == 0 assert executed == [True]