aboutsummaryrefslogtreecommitdiffstats
path: root/test/conftest.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-22 04:15:34 +0000
committerGitHub <noreply@github.com>2023-05-22 04:15:34 +0000
commit8137bdba61fd57cc1ddae801f6080d51e13d70c5 (patch)
treec5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /test/conftest.py
parenta862428902c4aecde8852761c3a4d95c196885cb (diff)
parent3366e494a1147e570d8527eea19da88edb3a1e0c (diff)
downloadstable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.tar.gz
stable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.tar.bz2
stable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.zip
Merge branch 'dev' into text-drag-fix
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/conftest.py b/test/conftest.py
new file mode 100644
index 00000000..0723f62a
--- /dev/null
+++ b/test/conftest.py
@@ -0,0 +1,17 @@
+import os
+
+import pytest
+from PIL import Image
+from gradio.processing_utils import encode_pil_to_base64
+
+test_files_path = os.path.dirname(__file__) + "/test_files"
+
+
+@pytest.fixture(scope="session") # session so we don't read this over and over
+def img2img_basic_image_base64() -> str:
+ return encode_pil_to_base64(Image.open(os.path.join(test_files_path, "img2img_basic.png")))
+
+
+@pytest.fixture(scope="session") # session so we don't read this over and over
+def mask_basic_image_base64() -> str:
+ return encode_pil_to_base64(Image.open(os.path.join(test_files_path, "mask_basic.png")))