Closed letmaik closed 7 years ago
windows has no fork support - so it can never be supported
Would it be possible to use multiprocessing.get_context('spawn').Process(...)
instead of forking? This would require passing the test node to the spawned process. I can see that Pytest nodes are not currently serializable with Pickle, but I'm not sure how difficult it would be to make them serializable.
I have a working proof of concept that uses multiprocessing with the 'fork'
context instead of py.process.ForkedFunc
. If passing test nodes into a spawned process is possible, it would be a big win.
I can see that Pytest nodes are not currently serializable with Pickle, but I'm not sure how difficult it would be to make them serializable.
Unfortunately very difficult ("impossible" is a harsh word but pretty close!).
Besides the pytest.Node
itself, there's also the problem of transferring the fixtures used by a test to the spawned process (with forking you don't have the problem because the memory is copied of course).
Great plugin! What would be required to add Windows support? Did anyone try it yet and has some insight on the obstacles?