pytest-xdist
is a pytest plugin which allows test execution in parallel. Paralellization works both by running a configurable number of processes on the same host, and across multiple hosts. It also supports running tests on multiple platforms and Python interpreters in parallel. Additionally, it supports automatic re-running of failed tests.
Reference: