aboutsummaryrefslogtreecommitdiff
path: root/test/server_poll.py
diff options
context:
space:
mode:
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 8e63b450..c71e906a 100644
--- a/test/server_poll.py
+++ b/test/server_poll.py
@@ -3,7 +3,7 @@ import requests
import time
-def run_tests(proc):
+def run_tests(proc, test_dir):
timeout_threshold = 240
start_time = time.time()
while time.time()-start_time < timeout_threshold:
@@ -14,7 +14,9 @@ def run_tests(proc):
if proc.poll() is not None:
break
if proc.poll() is None:
- suite = unittest.TestLoader().discover('', pattern='*_test.py')
+ if test_dir is None:
+ test_dir = ""
+ suite = unittest.TestLoader().discover(test_dir, pattern="*_test.py", top_level_dir="test")
result = unittest.TextTestRunner(verbosity=2).run(suite)
else:
print("Launch unsuccessful")