]> git.scottworley.com Git - pinch/blobdiff - test.sh
Release 3.0.10
[pinch] / test.sh
diff --git a/test.sh b/test.sh
index 779a65b7c91e67940221a58a2a93a60dc8c4cecf..81e0c667a707478cee8b4ae55a4f6f98a700459a 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -4,18 +4,30 @@ set -e
 
 PARALLELISM=4
 
-find . -name '*.py' -print0 | xargs -0 mypy --strict --ignore-missing-imports
+find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
+  xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores
+
+for test in tests/*;do
+  if [ ! -d "$test" ];then
+    echo "### Running test $test" >&2
+    "$test"
+  fi
+done
 
 find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3
 
-find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d invalid-name,missing-docstring,too-few-public-methods
+if [ "$1" = lint ];then
+
+  find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d fixme,invalid-name,missing-docstring,subprocess-run-check,too-few-public-methods
+
+  formatting_needs_fixing=$(
+    find . -name '*.py' -print0 |
+      xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+  )
+  if [[ "$formatting_needs_fixing" ]];then
+    echo "Formatting needs fixing:"
+    echo "$formatting_needs_fixing"
+    exit 1
+  fi
 
-formatting_needs_fixing=$(
-  find . -name '*.py' -print0 |
-    xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-)
-if [[ "$formatting_needs_fixing" ]];then
-  echo "Formatting needs fixing:"
-  echo "$formatting_needs_fixing"
-  exit 1
 fi