[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
f44b55c796
commit
18b50c1f8a
1 changed files with 2 additions and 0 deletions
|
|
@ -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"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue