Mercurial > hg > MakeItSo
changeset 194:41d17337656a
STUB: makeitso/python_package/tests/testall.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 16 May 2014 13:53:28 -0700 |
parents | a42d1aaa81c3 |
children | 3cb66c9e5ce8 |
files | makeitso/python_package/tests/testall.py |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/makeitso/python_package/tests/testall.py Thu May 08 16:55:51 2014 -0700 +++ b/makeitso/python_package/tests/testall.py Fri May 16 13:53:28 2014 -0700 @@ -24,11 +24,14 @@ print ("Success") sys.exit(0) else: - if n_failures: - print (results.failures) - if n_errors: - print (results.errors) - results.printErrors() + # print failures and errors + for label, item in (('FAIL', results.failures), + ('ERROR', results.errors)): + if item: + print ("\n{}::\n".format(label)) + for index, (i, message) in enumerate(item): + print ('{}) {}:'.format(index, str(i))) + print (message) sys.exit(1) if __name__ == '__main__':