More concise test summary info

This commit is contained in:
Thomas Kluyver 2013-10-14 16:19:36 -07:00
parent ba5fae3f70
commit 9b25eb7cdb

View File

@ -29,7 +29,7 @@ import time
from .iptest import have, test_group_names, test_sections from .iptest import have, test_group_names, test_sections
from IPython.utils.py3compat import bytes_to_str from IPython.utils.py3compat import bytes_to_str
from IPython.utils.sysinfo import sys_info from IPython.utils.sysinfo import brief_sys_info
from IPython.utils.tempdir import TemporaryDirectory from IPython.utils.tempdir import TemporaryDirectory
@ -206,7 +206,7 @@ def do_run(controller):
def report(): def report():
"""Return a string with a summary report of test-related variables.""" """Return a string with a summary report of test-related variables."""
out = [ sys_info(), '\n'] out = [ brief_sys_info(), '\n']
avail = [] avail = []
not_avail = [] not_avail = []
@ -327,17 +327,16 @@ def run_iptestall(options):
print('_'*70) print('_'*70)
print('Test suite completed for system with the following information:') print('Test suite completed for system with the following information:')
print(report()) print(report())
print('Ran %s test groups in %.3fs' % (nrunners, t_tests)) took = "Took %.3fs." % t_tests
print()
print('Status: ', end='') print('Status: ', end='')
if not failed: if not failed:
print('OK') print('OK.', took)
else: else:
# If anything went wrong, point out what command to rerun manually to # If anything went wrong, point out what command to rerun manually to
# see the actual errors and individual summary # see the actual errors and individual summary
failed_sections = [c.section for c in failed] failed_sections = [c.section for c in failed]
print('ERROR - {} out of {} test groups failed ({}).'.format(nfail, print('ERROR - {} out of {} test groups failed ({}).'.format(nfail,
nrunners, ', '.join(failed_sections))) nrunners, ', '.join(failed_sections)), took)
print() print()
print('You may wish to rerun these, with:') print('You may wish to rerun these, with:')
print(' iptest', *failed_sections) print(' iptest', *failed_sections)