From 8010fa8d893c8a64d9393611d90bb4e218840beb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 May 2014 14:37:47 +0200 Subject: [PATCH] Add unittest to run_checks.py --- scripts/run_checks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 519c59da2..a00e2967c 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -29,6 +29,7 @@ import sys import subprocess import os import os.path +import unittest from collections import OrderedDict try: @@ -108,6 +109,13 @@ def check_pep257(args=None): print() +def check_unittest(): + print("====== unittest ======") + suite = unittest.TestLoader().discover('.') + result = unittest.TextTestRunner().run(suite) + print() + status['unittest'] = result.wasSuccessful() + def check_line(): """Run _check_file over a filetree.""" print("====== line ======") @@ -198,6 +206,7 @@ def _get_args(checker): if do_check_257: check_pep257(_get_args('pep257')) +check_unittest() for checker in ['pylint', 'flake8', 'pyroma']: # FIXME what the hell is the flake8 exit status? run(checker, _get_args(checker))