diff --git a/run_checks.sh b/run_checks.sh deleted file mode 100755 index cf68c62..0000000 --- a/run_checks.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -e - -echo -echo "Running pycodestyle" -pycodestyle python/mwmatching python/run_matching.py tests - -echo -echo "Running mypy" -mypy --disallow-incomplete-defs python tests - -echo -echo "Running pylint" -pylint --ignore=test_algorithm.py python tests/*.py tests/generate/*.py || [ $(($? & 3)) -eq 0 ] - -echo -echo "Running unit tests" -python3 -m unittest discover -t python -s python/tests - -echo -echo "Checking test coverage" -coverage erase -coverage run --branch -m unittest discover -t python -s python/tests -coverage report -m - diff --git a/test_python.sh b/test_python.sh new file mode 100755 index 0000000..2bc2630 --- /dev/null +++ b/test_python.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +python3 --version + +echo +echo ">> Running pycodestyle" +pycodestyle python/mwmatching python/run_matching.py tests + +echo +echo ">> Running mypy" +mypy --disallow-incomplete-defs python tests + +echo +echo ">> Running pylint" +pylint --ignore=test_algorithm.py python tests/*.py tests/generate/*.py || [ $(($? & 3)) -eq 0 ] + +echo +echo ">> Running unit tests" +python3 -m unittest discover -t python -s python/tests + +echo +echo ">> Checking test coverage" +coverage erase +coverage run --branch -m unittest discover -t python -s python/tests +coverage report -m + +echo +echo ">> Running test graphs" +python3 python/run_matching.py --verify \ + tests/graphs/chain_n1000.edge \ + tests/graphs/chain_n5000.edge \ + tests/graphs/chain_n10000.edge \ + tests/graphs/sparse_delta_n1004.edge \ + tests/graphs/sparse_delta_n2004.edge \ + tests/graphs/sparse_delta_n5004.edge \ + tests/graphs/triangles_n1002.edge \ + tests/graphs/triangles_n5001.edge \ + tests/graphs/triangles_n10002.edge \ + tests/graphs/random_n1000_m10000.edge \ + tests/graphs/random_n2000_m10000.edge \ + tests/graphs/random_n4000_m10000.edge + +echo +echo ">> Done" +