Skip to content

Commit ffc5b70

Browse files
committed
extras test template added
1 parent 2f3d817 commit ffc5b70

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

test/extras_test.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import unittest
2+
import requests
3+
from gradio.processing_utils import encode_pil_to_base64
4+
from PIL import Image
5+
6+
class TestExtrasWorking(unittest.TestCase):
7+
def setUp(self):
8+
self.url_img2img = "http://localhost:7860/sdapi/v1/extra-single-image"
9+
self.simple_extras = {
10+
"resize_mode": 0,
11+
"show_extras_results": True,
12+
"gfpgan_visibility": 0,
13+
"codeformer_visibility": 0,
14+
"codeformer_weight": 0,
15+
"upscaling_resize": 2,
16+
"upscaling_resize_w": 512,
17+
"upscaling_resize_h": 512,
18+
"upscaling_crop": True,
19+
"upscaler_1": "None",
20+
"upscaler_2": "None",
21+
"extras_upscaler_2_visibility": 0,
22+
"image": ""
23+
}
24+
25+
class TestExtrasCorrectness(unittest.TestCase):
26+
pass
27+
28+
if __name__ == "__main__":
29+
unittest.main()

test/img2img_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from gradio.processing_utils import encode_pil_to_base64
44
from PIL import Image
55

6-
class Img2ImgWorking(unittest.TestCase):
6+
class TestImg2ImgWorking(unittest.TestCase):
77
def setUp(self):
88
self.url_img2img = "http://localhost:7860/sdapi/v1/img2img"
99
self.simple_img2img = {
@@ -56,4 +56,4 @@ class TestImg2ImgCorrectness(unittest.TestCase):
5656
pass
5757

5858
if __name__ == "__main__":
59-
unittest.main()
59+
unittest.main()

0 commit comments

Comments
 (0)