summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-09-03 09:42:21 +0300
committerLars Wirzenius <liw@liw.fi>2020-09-04 10:30:18 +0300
commit7c475ae52569b6c5bf6c911221b7e6a52a1a868c (patch)
treef63ab63e42d15d09a0d275e1d212c84bf668395a /check
parente2b5621f55a1e3ced093114fd094ff8f680b51c5 (diff)
downloadsubplot-7c475ae52569b6c5bf6c911221b7e6a52a1a868c.tar.gz
test(check): run unit tests, flake8 on Python template helpers
Diffstat (limited to 'check')
-rwxr-xr-xcheck15
1 files changed, 15 insertions, 0 deletions
diff --git a/check b/check
index 652705c..a876e54 100755
--- a/check
+++ b/check
@@ -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