mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-13 00:30:17 +00:00
fix spinner
This commit is contained in:
@@ -78,14 +78,16 @@ def run_tests(max_jobs=None, stop_on_first_err=True, with_spinner=True):
|
|||||||
failed = 0
|
failed = 0
|
||||||
success = 0
|
success = 0
|
||||||
spinner = None
|
spinner = None
|
||||||
|
logfd = sys.stdout
|
||||||
if not is_cicd() and with_spinner:
|
if not is_cicd() and with_spinner:
|
||||||
# no spinner on github actions
|
# no spinner on github actions
|
||||||
spinner = Halo(text='Testing', spinner='bouncingBall')
|
spinner = Halo(text='Testing', spinner='bouncingBall')
|
||||||
spinner.start()
|
spinner.start()
|
||||||
|
logfd = None
|
||||||
with futures.ThreadPoolExecutor(max_workers=max_jobs) as ex:
|
with futures.ThreadPoolExecutor(max_workers=max_jobs) as ex:
|
||||||
wait_for = {}
|
wait_for = {}
|
||||||
for test in tests:
|
for test in tests:
|
||||||
j = ex.submit(run_test, sys.stdout, test)
|
j = ex.submit(run_test, logfd, test)
|
||||||
wait_for[j] = test
|
wait_for[j] = test
|
||||||
|
|
||||||
for test in futures.as_completed(wait_for.keys()):
|
for test in futures.as_completed(wait_for.keys()):
|
||||||
|
|||||||
Reference in New Issue
Block a user