From 1a6d66f395992243e1d27818f01049486991dd98 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 13 Apr 2020 08:55:29 +0200 Subject: [PATCH] Run tests in parallel on multi-core systems Uses pytest-xdist to run tests on two cores simultaneously, speeding up test runs by nearly 40%. --- pyproject.toml | 1 + requirements/test.pip | 1 + tox.ini | 1 + 3 files changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f7876002..e1de7637 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ pytest = "~5.3.5" pytest-cov = "^2.8" pytest-pythonpath = "^0.7.3" pytest-sugar = "^0.9.2" +pytest-xdist = "^1.31" tox = "^3.13" flake8 = "^3.7" flake8-import-order = "^0.18.1" diff --git a/requirements/test.pip b/requirements/test.pip index d9d91914..81d74c4e 100644 --- a/requirements/test.pip +++ b/requirements/test.pip @@ -3,6 +3,7 @@ Pygments==2.6.1 mock pytest==5.3.5 pytest-cov +pytest-xdist # Optional Packages Markdown >= 3.1 diff --git a/tox.ini b/tox.ini index ed025c25..a7543a17 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ commands = filterwarnings = default::DeprecationWarning error:.*:Warning:pelican +addopts = -n 2 [flake8] application-import-names = pelican