[pytest-dev] creating pytest-boxed and removing boxed from xdist

Ronny Pfannschmidt opensource at ronnypfannschmidt.de
Wed Oct 12 01:43:33 EDT 2016



On 12.10.2016 02:16, oliver wrote:
> On Tue, Oct 11, 2016, 18:57 Bruno Oliveira <nicoddemus at gmail.com
> <mailto:nicoddemus at gmail.com>> wrote:
>
>     On Tue, Oct 11, 2016 at 7:46 PM oliver
>     <oliver.schoenborn at gmail.com <mailto:oliver.schoenborn at gmail.com>>
>     wrote:
>
>         Is there any plan to port boxed and xdist plugins to Windows?
>         What are the issues that have prevented implementation from
>         happening (or happening sooner, if planned)?
>
>
>     Hey,
>
>     The boxed implementation depends on os.fork, which is not
>     available on Windows. But except for --boxed, xdist works just
>     fine on Windows.
>
>     A common question is "Why not use a sub-process instead?" One of
>     the reasons is that is not really simple to serialize and send the
>     collected tests on a wire to a subprocess, so xdist uses fork to
>     spawn a child sharing the same memory and control it from master
>     in case it crashes.
>
>
> Thanks for info. Just trying to see if I could help with this... "send
> the collected tests...  to a subprocess" and "control [subprocess]
>  from master in case it crashes" are not that difficult on Windows, is
> there some deeper problem or other requirement that is headache?
its halfway implemented as slave-restart, the main problem is that the
current implementation grew into spaghetti,
since it implements state-machines in a totally non-formal way thus has
impossible to debug bugs
>
>     I think I read someone mention that the "slave restart"
>     functionality is considered a good enough replacement for boxed, 
>
>
> This covers recovery after a test crashes the suite, but AFAICT it
> doesn't support isolating a test from all the other tests so no
> sharing of memory space, or to test mutually exclusive import
> configurations etc, does it?
all that's needed for full isolation is to instruct each slave to run
and teardown exactly one test
in fact the isolation will be much better than what we currently have
(fork for runtestprotocol)

i just absolutely want to avoid having to implement that flow on top of
the current code-base

-- Ronny


> Oliver
>
> -- 
> Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20161012/ad123661/attachment-0001.html>


More information about the pytest-dev mailing list