mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
added test count to test result
This commit is contained in:
@@ -214,6 +214,8 @@ def test_dir(completion_test_dir, thirdparty=False):
|
|||||||
path = os.path.join(completion_test_dir, f_name)
|
path = os.path.join(completion_test_dir, f_name)
|
||||||
f = open(path)
|
f = open(path)
|
||||||
num_tests, fails = run_test(f.read(), f_name, lines_to_execute)
|
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)
|
s = 'run %s tests with %s fails (%s)' % (num_tests, fails, f_name)
|
||||||
tests_fail += fails
|
tests_fail += fails
|
||||||
@@ -221,6 +223,7 @@ def test_dir(completion_test_dir, thirdparty=False):
|
|||||||
summary.append(s)
|
summary.append(s)
|
||||||
|
|
||||||
|
|
||||||
|
test_sum = 0
|
||||||
t_start = time.time()
|
t_start = time.time()
|
||||||
# Sorry I didn't use argparse here. It's because argparse is not in the
|
# Sorry I didn't use argparse here. It's because argparse is not in the
|
||||||
# stdlib in 2.5.
|
# stdlib in 2.5.
|
||||||
@@ -265,7 +268,8 @@ if test_files or thirdparty:
|
|||||||
completion_test_dir += '/thirdparty'
|
completion_test_dir += '/thirdparty'
|
||||||
test_dir(completion_test_dir, thirdparty=True)
|
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:
|
for s in summary:
|
||||||
print(s)
|
print(s)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user