[FIX] --test-file regression introduced by chs

bzr revid: al@openerp.com-20140306221947-ex5nk6mu2py0zinh
This commit is contained in:
Antony Lesuisse 2014-03-06 23:19:47 +01:00
parent 1a38a08687
commit c878b34c3e
1 changed files with 2 additions and 1 deletions

View File

@ -851,7 +851,8 @@ def load_test_file_py(registry, test_file):
stream = openerp.modules.module.TestStream()
result = unittest2.TextTestRunner(verbosity=2, stream=stream).run(suite)
success = result.wasSuccessful()
registry._assertion_report.report_result(success)
if hasattr(registry._assertion_report,'report_result'):
registry._assertion_report.report_result(success)
if not success:
_logger.error('%s: at least one error occurred in a test', test_file)