From 7c475ae52569b6c5bf6c911221b7e6a52a1a868c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 3 Sep 2020 09:42:21 +0300 Subject: test(check): run unit tests, flake8 on Python template helpers --- check | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'check') 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 -- cgit v1.2.1