From c94ff0101caaf5cac76992a7c71e2f55dc87f882 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 6 Apr 2024 07:41:01 +0200 Subject: [PATCH] add more tests --- Contributions.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Contributions.md b/Contributions.md index be31a7c..b7a3b99 100644 --- a/Contributions.md +++ b/Contributions.md @@ -8,21 +8,41 @@ In any case, before submitting a PR, please run test locally to validate your PR ## Syntax/Code Test -### Run "flake8" +### Preparation + +Install required packages, e.g. on Fedora Linux + +``` +yum install python3-flake8 python3-isort python3-mypy python3-pytest python3-pytest-isort python3-typeguard +``` + +### Tests + +#### Run "flake8" ``` flake8 ... ``` +No error should be reported! -### Run "isort" +#### Run "isort" ``` isort --check --diff . ... ``` +No error should be reported! -### Run "pytest" +### Run "mypy" + +``` +python -c 'import importlib.util, subprocess, sys; importlib.util.find_spec("mypy") and sys.exit(subprocess.run(["mypy", "."]).returncode) or print("Skipped: mypy is not installed")' +... +``` +No error should be reported! + +#### Run "pytest" ``` python3 setup.py build || exit 1