diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-22 04:15:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 04:15:34 +0000 |
commit | 8137bdba61fd57cc1ddae801f6080d51e13d70c5 (patch) | |
tree | c5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /test/conftest.py | |
parent | a862428902c4aecde8852761c3a4d95c196885cb (diff) | |
parent | 3366e494a1147e570d8527eea19da88edb3a1e0c (diff) | |
download | stable-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.py | 17 |
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"))) |