diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-03 09:42:21 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-04 10:30:18 +0300 |
commit | 7c475ae52569b6c5bf6c911221b7e6a52a1a868c (patch) | |
tree | f63ab63e42d15d09a0d275e1d212c84bf668395a /check | |
parent | e2b5621f55a1e3ced093114fd094ff8f680b51c5 (diff) | |
download | subplot-7c475ae52569b6c5bf6c911221b7e6a52a1a868c.tar.gz |
test(check): run unit tests, flake8 on Python template helpers
Diffstat (limited to 'check')
-rwxr-xr-x | check | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -34,6 +34,21 @@ docgen() { cargo run $quiet --bin sp-docgen -- "$1" --output "$2" } +# Run unit tests for the Python template. +(set -eu + cd templates/python + for x in *_tests.py + do + $hideok echo "Unit tests: $x" + $hideok python3 "$x" + $hideok echo + done) + +if command -v flake8 > /dev/null +then + $hideok flake8 templates/python --exclude=template.py +fi + $hideok cargo build --all-targets if cargo --list | awk '{ print $1 }' | grep 'clippy$' > /dev/null then |