aboutsummaryrefslogtreecommitdiffstats
path: root/test/server_poll.py
diff options
context:
space:
mode:
authorInvincibleDude <81354513+InvincibleDude@users.noreply.github.com>2023-03-14 13:55:59 +0000
committerGitHub <noreply@github.com>2023-03-14 13:55:59 +0000
commitf5e44364535ccc7efef445dacb6395c3942f2f17 (patch)
treeca7384e6225fccdae1e89db1e0ccc44dd60c7311 /test/server_poll.py
parentf6e27378404631d951656388fc178b784fe1495b (diff)
parenta9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff)
downloadstable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.tar.gz
stable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.tar.bz2
stable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.zip
Merge branch 'master' into improved-hr-conflict-test
Diffstat (limited to 'test/server_poll.py')
-rw-r--r--test/server_poll.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/server_poll.py b/test/server_poll.py
index 42d56a4c..c732630f 100644
--- a/test/server_poll.py
+++ b/test/server_poll.py
@@ -1,6 +1,8 @@
import unittest
import requests
import time
+import os
+from modules.paths import script_path
def run_tests(proc, test_dir):
@@ -15,8 +17,8 @@ def run_tests(proc, test_dir):
break
if proc.poll() is None:
if test_dir is None:
- test_dir = "test"
- suite = unittest.TestLoader().discover(test_dir, pattern="*_test.py", top_level_dir="test")
+ test_dir = os.path.join(script_path, "test")
+ suite = unittest.TestLoader().discover(test_dir, pattern="*_test.py", top_level_dir=test_dir)
result = unittest.TextTestRunner(verbosity=2).run(suite)
return len(result.failures) + len(result.errors)
else: