mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-14 09:37:05 +08:00
added time used by test script
This commit is contained in:
@@ -3,6 +3,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
import time
|
||||||
from os.path import abspath, dirname
|
from os.path import abspath, dirname
|
||||||
|
|
||||||
sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/../jedi'))
|
sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/../jedi'))
|
||||||
@@ -220,6 +221,7 @@ def test_dir(completion_test_dir, thirdparty=False):
|
|||||||
summary.append(s)
|
summary.append(s)
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
@@ -263,7 +265,7 @@ 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)' % tests_fail)
|
print('\nSummary: (%s fails) in %.3fs' % (tests_fail, time.time() - t_start))
|
||||||
for s in summary:
|
for s in summary:
|
||||||
print(s)
|
print(s)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user