summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-10 21:42:01 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-10 21:42:01 +0100
commit3e5f3ce0680ba2037d75f98f47dd9f422bd8bb37 (patch)
treeeb97fd9e3ddaf4b40b138284676efd58218cde19
parenta0c62a17f539adc4b1a13eec3d3d0f99081a0f33 (diff)
downloadttystatus-3e5f3ce0680ba2037d75f98f47dd9f422bd8bb37.tar.gz
Add: run unit tests with both Python 2 and 3
Also, prettify source and output.
-rwxr-xr-xcheck25
1 files changed, 22 insertions, 3 deletions
diff --git a/check b/check
index 819058f..808c8a2 100755
--- a/check
+++ b/check
@@ -2,7 +2,26 @@
set -eu
-python -m CoverageTestRunner --ignore-missing-from=without-tests
+title()
+{
+ printf '\n\n%s\n' "$@"
+ for i in $(seq 77)
+ do
+ printf "-"
+ done
+ printf '\n'
+}
+
+title "Python2 unit tests"
+python2 -m CoverageTestRunner --ignore-missing-from=without-tests
+rm -f .coverage
+
+title "Python3 unit tests"
+python3 -m CoverageTestRunner --ignore-missing-from=without-tests
rm -f .coverage
-pep8 ttystatus
-PYTHONPATH=. pylint --rcfile=pylint.conf ttystatus
+
+title "Style checks"
+pycodestyle ttystatus
+
+title "Static checks"
+PYTHONPATH=. pylint3 --rcfile=pylint.conf ttystatus