diff options
| author | 2021-06-07 05:28:07 +0300 | |
|---|---|---|
| committer | 2021-06-07 05:28:29 +0300 | |
| commit | 13442f859f452578397766dedc7904928794610a (patch) | |
| tree | 52069485875644e07f2733b3b0680f0231ffd33a /pyproject.toml | |
| parent | Merge 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.toml | 5 | 
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" | 
