[IMP] Use the loglevel TEST when logging test file loading and testsuite execution.

bzr revid: vmt@openerp.com-20121203104228-8a5on97pn9r1klls
This commit is contained in:
Vo Minh Thu 2012-12-03 11:42:28 +01:00
parent e87ff010e7
commit 7afd9783e8
2 changed files with 5 additions and 2 deletions

View File

@ -104,7 +104,10 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
"""
for filename in package.data[kind]:
_logger.info("module %s: loading %s", module_name, filename)
if kind == 'test':
_logger.log(logging.TEST, "module %s: loading %s", module_name, filename)
else:
_logger.info("module %s: loading %s", module_name, filename)
_, ext = os.path.splitext(filename)
pathname = os.path.join(module_name, filename)
fp = tools.file_open(pathname)

View File

@ -553,7 +553,7 @@ def run_unit_tests(module_name):
for m in ms:
suite.addTests(unittest2.TestLoader().loadTestsFromModule(m))
if ms:
_logger.info('module %s: executing %s `fast_suite` and/or `checks` sub-modules', module_name, len(ms))
_logger.log(logging.TEST, 'module %s: executing %s `fast_suite` and/or `checks` sub-modules', module_name, len(ms))
# Use a custom stream object to log the test executions.
class MyStream(object):
def __init__(self):