aboutsummaryrefslogtreecommitdiff
path: root/test/server_poll.py
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-05-25 18:53:33 -0600
committerGitHub <noreply@github.com>2023-05-25 18:53:33 -0600
commit6645f23c4c715b1bc704c88a499b2f4224d7f1e6 (patch)
tree6aeb51e366254fe8993856a3db341690bb39dca5 /test/server_poll.py
parent43bdaa2f0eda79c685792b06a2bd84c65806a48f (diff)
parenta6e653be26cc05f4438145fa0082816e9fbbf5fc (diff)
Merge branch 'dev' into reorder-hotkeys
Diffstat (limited to 'test/server_poll.py')
-rw-r--r--test/server_poll.py26
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