2024-06-22 20:04:49 +02:00
|
|
|
#!/bin/bash
|
2023-04-14 15:45:26 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2024-06-22 20:04:49 +02:00
|
|
|
echo
|
|
|
|
echo "Running pycodestyle"
|
2024-07-07 10:30:21 +02:00
|
|
|
pycodestyle python/mwmatching python/run_matching.py tests
|
2024-06-22 20:04:49 +02:00
|
|
|
|
2023-04-14 15:45:26 +02:00
|
|
|
echo
|
|
|
|
echo "Running mypy"
|
|
|
|
mypy --disallow-incomplete-defs python tests
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Running pylint"
|
2024-07-07 10:30:21 +02:00
|
|
|
pylint --ignore=test_algorithm.py python tests/*.py tests/generate/*.py || [ $(($? & 3)) -eq 0 ]
|
2023-04-14 15:45:26 +02:00
|
|
|
|
|
|
|
echo
|
2024-07-07 10:30:21 +02:00
|
|
|
echo "Running unit tests"
|
|
|
|
python3 -m unittest discover -t python -s python/tests
|
2024-07-06 20:22:18 +02:00
|
|
|
|
2023-04-14 15:45:26 +02:00
|
|
|
echo
|
|
|
|
echo "Checking test coverage"
|
|
|
|
coverage erase
|
2024-07-07 10:30:21 +02:00
|
|
|
coverage run --branch -m unittest discover -t python -s python/tests
|
2023-04-14 15:45:26 +02:00
|
|
|
coverage report -m
|
|
|
|
|