You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Sourabh Bajaj <so...@google.com.INVALID> on 2017/04/14 21:30:06 UTC

Tip: Faster python tests during development with detox

Hi,

Currently Tox our tool to run presubmits in different environments runs the
job in series so can be a bit slow. There is a sister project
<http://tox.readthedocs.io/en/latest/announce/release-1.4.3.html?highlight=parallel>
to Tox called detox <https://pypi.python.org/pypi/detox/>. It wraps around
Tox and uses greenlet to run the jobs in parallel.

On preliminary testing on my machine it was 3x faster so saved me about
4mins for each run.

Found this out today so thought it'll be good to share with everyone :)

Thanks
Sourabh

Re: Tip: Faster python tests during development with detox

Posted by Ahmet Altay <al...@google.com.INVALID>.
Nice and thank you for this. It is great for developer testing. First I
thought it will run tests in parallel but it actually runs different test
configurations in parallel.

I had two issues with it:
1. Breaking tests in the middle with ctrl+c caused obscure errors in the
following runs about invoking tests.
2. Our cython based tests do some cleanup afterwards so that non-cython
based tests can test non-cython based environments. It seems like by
running in environments in parallel we are not testing those aspects
correctly.

Ahmet

On Fri, Apr 14, 2017 at 2:30 PM, Sourabh Bajaj <
sourabhbajaj@google.com.invalid> wrote:

> Hi,
>
> Currently Tox our tool to run presubmits in different environments runs the
> job in series so can be a bit slow. There is a sister project
> <http://tox.readthedocs.io/en/latest/announce/release-1.4.3.
> html?highlight=parallel>
> to Tox called detox <https://pypi.python.org/pypi/detox/>. It wraps around
> Tox and uses greenlet to run the jobs in parallel.
>
> On preliminary testing on my machine it was 3x faster so saved me about
> 4mins for each run.
>
> Found this out today so thought it'll be good to share with everyone :)
>
> Thanks
> Sourabh
>