+++ /dev/null
-[BASIC]
-init-hook='import sys; sys.path[0:0] = ["src"]'
-good-names-rgxs=(.*_)?(GET|POST)(_.+)?,,test_[A-Z]+
#!/bin/sh
+set -e
+
+echo "===[ Running linters on source directories. ]==="
DIRS='src src/taskplom tests'
-TOOLS='flake8 pylint mypy'
-for dir in $DIRS; do
- for tool in $TOOLS; do
- echo "Running ${tool} on ${dir}/ …."
- python3 -m ${tool} ${dir}/*.py
- done
+DIRS=tests
+for DIR in $DIRS; do
+ lintplom "${DIR}"
done
-echo "Running unittest-parallel on tests/."
-set -e
+
+echo "\n\n===[ Running unittest-parallel on tests/. ]==="
+DIR_VENV=/tmp/taskplom_venv_unittest_parallel
+if [ ! -d "${DIR_VENV}" ]; then
+ mkdir "${DIR_VENV}"
+ python3 -m venv "${DIR_VENV}"
+fi
+. "${DIR_VENV}/bin/activate"
+pip3 install unittest-parallel
+pip3 install -r tests/requirements.txt
unittest-parallel -t . -s tests/ -p '*.py'