diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-08 13:50:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 13:50:23 +0000 |
commit | 993dd9a8927407de8d19142cacb07e6f76686a67 (patch) | |
tree | 89df31c33ecf054c9cb70aaf38fc3382f306f450 /test/server_poll.py | |
parent | ff6acd35d0807a4e0c3ee86cdb1520a4a3a11cdd (diff) | |
parent | d7d6e8cfc8b85a99a48f82975ee213d487783c28 (diff) | |
download | stable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.tar.gz stable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.tar.bz2 stable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.zip |
Merge branch 'dev' into patch-1
Diffstat (limited to 'test/server_poll.py')
-rw-r--r-- | test/server_poll.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/server_poll.py b/test/server_poll.py deleted file mode 100644 index c732630f..00000000 --- a/test/server_poll.py +++ /dev/null @@ -1,26 +0,0 @@ -import unittest -import requests -import time -import os -from modules.paths import script_path - - -def run_tests(proc, test_dir): - timeout_threshold = 240 - start_time = time.time() - while time.time()-start_time < timeout_threshold: - try: - requests.head("http://localhost:7860/") - break - except requests.exceptions.ConnectionError: - if proc.poll() is not None: - break - if proc.poll() is None: - if test_dir is None: - 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: - print("Launch unsuccessful") - return 1 |