From 2f7beebc61065b2aab46be84f32b3cbd3b8932a0 Mon Sep 17 00:00:00 2001 From: Cenny Date: Sat, 13 May 2023 22:06:50 +0200 Subject: [PATCH] Make sdwebui tests pass (when SD is running) (#3721) Co-authored-by: Nicholas Tindle --- tests/test_image_gen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_image_gen.py b/tests/test_image_gen.py index 546cc758..b4eb99e0 100644 --- a/tests/test_image_gen.py +++ b/tests/test_image_gen.py @@ -48,18 +48,18 @@ def test_huggingface(config, workspace, image_size, image_model): ) -@pytest.mark.xfail(reason="SD WebUI call does not work.") +@pytest.mark.skip(reason="External SD WebUI may not be available.") def test_sd_webui(config, workspace, image_size): """Test SD WebUI image generation.""" generate_and_validate( config, workspace, - image_provider="sd_webui", + image_provider="sdwebui", image_size=image_size, ) -@pytest.mark.xfail(reason="SD WebUI call does not work.") +@pytest.mark.skip(reason="External SD WebUI may not be available.") def test_sd_webui_negative_prompt(config, workspace, image_size): gen_image = functools.partial( generate_image_with_sd_webui, @@ -83,7 +83,7 @@ def test_sd_webui_negative_prompt(config, workspace, image_size): def lst(txt): """Extract the file path from the output of `generate_image()`""" - return Path(txt.split(":")[1].strip()) + return Path(txt.split(":", maxsplit=1)[1].strip()) def generate_and_validate(