Use execnet main_thread_only execmodel (#1027)

Use the execnet main_thread_only execmodel so that code which expects
to run in the main thread will just work.  This execmodel has been
merged to the execnet master branch via pytest-dev/execnet#243, so this
patch should not be merged until there is a released version of execnet
supporting the main_thread_only execmodel.

Closes #620
This commit is contained in:
Zac Medico
2024-04-19 04:03:32 -07:00
committed by GitHub
parent 0a4238f6da
commit 20e3ac774e
6 changed files with 13 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ class WorkerSetup:
def setup(self) -> None:
self.pytester.chdir()
# import os ; os.environ['EXECNET_DEBUG'] = "2"
self.gateway = execnet.makegateway()
self.gateway = execnet.makegateway("execmodel=main_thread_only//popen")
self.config = config = self.pytester.parseconfigure()
putevent = self.events.put if self.use_callback else None