ConaireD / TolimanWIP

WIP Toliman codes go here before being added to the main TOLIMAN github
Other
0 stars 0 forks source link

Faster Unit Tests with `pytest-concurrent`. #15

Closed Jordan-Dennis closed 1 year ago

Jordan-Dennis commented 1 year ago

Hi all, Another plugin that I discovered during my research was pytest-concurrent. Since the tests are a little slow, this will be very useful for getting them to run faster overall. I just need to make sure that they interact nicely with the other pytest plugins that I am planning to use. Regards Jordan.

Jordan-Dennis commented 1 year ago

I have found an alternative in pytest-parallel. Again I have not used either yet but will try both/research comparisons to determine which options is the best.

Jordan-Dennis commented 1 year ago

So in the end pytest-xdist was the only one that worked out of the box. Now, it reduced the total duration of the tests by about half, but it increased the time each test took. I still think that this is worth it to address the F in F.I.R.S.T (see #13).

Jordan-Dennis commented 1 year ago

So it turns out that pytest has an inbuilt mark for dealing with pytest-xdist called pytest.mark.xdist_group. I should set this up so that the tests which take the longest time run together.