summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Mayer <entroP@gmail.com>2020-04-13 08:55:29 +0200
committerJustin Mayer <entroP@gmail.com>2020-04-13 08:55:29 +0200
commit1a6d66f395992243e1d27818f01049486991dd98 (patch)
tree746726ad5a3bee66133b1666f1d37a9fa714ef8c
parentfc8a3c719f3332d9dcb9a204feaaf7775a237750 (diff)
downloadpelican-1a6d66f395992243e1d27818f01049486991dd98.tar.gz
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%.
-rw-r--r--pyproject.toml1
-rw-r--r--requirements/test.pip1
-rw-r--r--tox.ini1
3 files changed, 3 insertions, 0 deletions
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