Add unittest to run_checks.py
This commit is contained in:
parent
7fb0a7745b
commit
8010fa8d89
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user