From 099e2410ad31c1f85f498a9d3cb2f467bbe80b72 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 16 Dec 2012 04:09:45 +0100 Subject: [PATCH] added test count to test result --- test/run.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/run.py b/test/run.py index d33e6dd4..de5dc810 100755 --- a/test/run.py +++ b/test/run.py @@ -214,6 +214,8 @@ def test_dir(completion_test_dir, thirdparty=False): path = os.path.join(completion_test_dir, f_name) f = open(path) num_tests, fails = run_test(f.read(), f_name, lines_to_execute) + global test_sum + test_sum += num_tests s = 'run %s tests with %s fails (%s)' % (num_tests, fails, f_name) tests_fail += fails @@ -221,6 +223,7 @@ def test_dir(completion_test_dir, thirdparty=False): summary.append(s) +test_sum = 0 t_start = time.time() # Sorry I didn't use argparse here. It's because argparse is not in the # stdlib in 2.5. @@ -265,7 +268,8 @@ if test_files or thirdparty: completion_test_dir += '/thirdparty' test_dir(completion_test_dir, thirdparty=True) -print('\nSummary: (%s fails) in %.3fs' % (tests_fail, time.time() - t_start)) +print('\nSummary: (%s fails of %s tests) in %.3fs' % (tests_fail, test_sum, + time.time() - t_start)) for s in summary: print(s)