aboutsummaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-06-07 05:28:07 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-06-07 05:28:29 +0300
commit13442f859f452578397766dedc7904928794610a (patch)
tree52069485875644e07f2733b3b0680f0231ffd33a /pyproject.toml
parentMerge pull request #1625 from python-discord/docker-compose-restart-policy (diff)
Switches To Pytest As Test Runner
Switches the test runner from unittest to pytest, to allow the usage of plugins such as xdist. This commit also adds pytest-cov purely as a generator for .coverage files. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 320bf88cc..2c9181889 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,6 +47,9 @@ pep8-naming = "~=0.9"
pre-commit = "~=2.1"
taskipy = "~=1.7.0"
python-dotenv = "~=0.17.1"
+pytest = "~=6.2.4"
+pytest-cov = "~=2.12.1"
+pytest-xdist = { version = "~=2.2.1", extras = ["psutil"] }
[build-system]
requires = ["poetry-core>=1.0.0"]
@@ -58,6 +61,6 @@ lint = "pre-commit run --all-files"
precommit = "pre-commit install"
build = "docker build -t ghcr.io/python-discord/bot:latest -f Dockerfile ."
push = "docker push ghcr.io/python-discord/bot:latest"
-test = "coverage run -m unittest"
+test = "pytest -n auto --cov-report= --cov bot "
html = "coverage html"
report = "coverage report"