ESSS / pytest-regressions

Pytest plugin for regression testing: https://pytest-regressions.readthedocs.io
MIT License
182 stars 36 forks source link

Multiprocessing of regression test #133

Closed pedro-alves-dv closed 1 year ago

pedro-alves-dv commented 1 year ago

I am wondering if there is a good way to run these regression tests in parallel using simple joblib applications.

Running the code below:

def main_test_runner_per_market(dataframe_regression, num_regression, data_regression):
      pass

markets = ["Market_1", "Market_2"]
sub_regression_tests = [
    delayed(main_test_runner_per_market)(dataframe_regression, num_regression, data_regression, market)
    for market in markets
]
Parallel(backend="multiprocessing", n_jobs=-1)(sub_regression_tests)

Returns :

nicoddemus commented 1 year ago

@pedro-alves-dv this is out of scope for pytest-regressions, which just provides fixtures to generate/check regressions. Running tests in parallel is better left to dedicated plugins, like pytest-xdist or pytest-mp.