From 7493ea9c48d78d73eb76ecaf316bf651c6281188 Mon Sep 17 00:00:00 2001 From: Bart Feenstra Date: Mon, 5 Feb 2024 13:39:30 +0000 Subject: [PATCH] Run Pytest tests in parallel. (#1053) --- bin/test-pytest | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/test-pytest b/bin/test-pytest index 916a7107e..ae5f3c61d 100755 --- a/bin/test-pytest +++ b/bin/test-pytest @@ -7,4 +7,4 @@ cd "$(dirname "$0")/.." echo 'Running pytest...' coverage erase -PYTHONWARNINGS='error:::betty[.*]' pytest --cov --cov-append --cov-config=.coveragerc --no-cov-on-fail "$@" +PYTHONWARNINGS='error:::betty[.*]' pytest --cov --cov-append --cov-config=.coveragerc --no-cov-on-fail -n auto "$@" diff --git a/pyproject.toml b/pyproject.toml index fe3538edd..cbcf94067 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,7 @@ test = [ 'pytest-cov ~= 4.0, >= 4.0.0', 'pytest-mock ~= 3.10, >= 3.10.0', 'pytest-qt ~= 4.2, >= 4.2.0', + 'pytest-xdist ~= 3.5, >= 3.5.0', 'pytest-xvfb ~= 3.0, >= 3.0.0', 'types-aiofiles ~= 23.2, >= 23.2.0.0', 'types-click ~= 7.1, >= 7.1.8',