mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
clear envvar, add assertion
This commit is contained in:
parent
7ec275fae7
commit
76a21b9626
@ -282,6 +282,7 @@ def tests(test_dir):
|
||||
|
||||
print(f"Launching Web UI in another process for testing with arguments: {' '.join(sys.argv[1:])}")
|
||||
|
||||
os.environ['COMMANDLINE_ARGS'] = ""
|
||||
with open('test/stdout.txt', "w", encoding="utf8") as stdout, open('test/stderr.txt', "w", encoding="utf8") as stderr:
|
||||
proc = subprocess.Popen([sys.executable, *sys.argv], stdout=stdout, stderr=stderr)
|
||||
|
||||
|
@ -43,6 +43,7 @@ class TestTxt2ImgWorking(unittest.TestCase):
|
||||
|
||||
def test_txt2img_with_complex_prompt_performed(self):
|
||||
self.simple_txt2img["prompt"] = "((emphasis)), (emphasis1:1.1), [to:1], [from::2], [from:to:0.3], [alt|alt1]"
|
||||
self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200)
|
||||
|
||||
def test_txt2img_not_square_image_performed(self):
|
||||
self.simple_txt2img["height"] = 128
|
||||
|
Loading…
Reference in New Issue
Block a user