To solve this I propose to not use a ThreadWorker if tests_per_worker==1 and just run it directly
we can use the following instead of process_with_threads:
This function will be called from subprocesses, forked from the main
# pytest process. First thing we need to do is to change config's value
# so we know we are running as a worker.
config.parallel_worker = True
pickling_support.install()
while True:
try:
index = queue.get()
if index == 'stop':
queue.task_done()
break
except ConnectionRefusedError:
time.sleep(.1)
continue
item = session.items[index]
try:
pytest_parallel.run_test(session, item, None)
except BaseException:
import pickle
import sys
errors.put(('name', pickle.dumps(sys.exc_info())))
finally:
try:
queue.task_done()
except ConnectionRefusedError:
pass
I have some tests using signal and I get" ` signalnum = <Signals.SIGINT: 2> handler =
To solve this I propose to not use a ThreadWorker if tests_per_worker==1 and just run it directly we can use the following instead of process_with_threads:
` def process_with_one_thread(config, queue, session, tests_per_worker, errors):
This function will be called from subprocesses, forked from the main
`