From 18b50c1f8aed54e9fdac2a2f40521ca29f4eaea5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 00:34:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/tests/test_diffusion_backend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/studio/backend/tests/test_diffusion_backend.py b/studio/backend/tests/test_diffusion_backend.py index 55a7dafddf..1c8dcb5864 100644 --- a/studio/backend/tests/test_diffusion_backend.py +++ b/studio/backend/tests/test_diffusion_backend.py @@ -439,8 +439,10 @@ def test_failed_swap_clears_previous_metadata(monkeypatch): # Replace from_pretrained on the SAME fake module with a raising one # without re-installing the rest of the fakes. fake = sys.modules["diffusers"] + def _boom(cls, *a, **kw): raise RuntimeError("simulated swap failure") + fake.Flux2KleinPipeline.from_pretrained = classmethod(_boom) with pytest.raises(RuntimeError, match = "Failed to load diffusion model"):