[IMP] base_module_quality: make minimal score for all test, add message if the score is below limit,varible for whether to activate the test or not

bzr revid: mra@tinyerp.com-20090828072457-en2vpm5l1514xtj7
This commit is contained in:
mra (Open ERP)
2009-08-28 12:54:57 +05:30
parent 466cdeb5d3
commit fc5d45c54a
11 changed files with 70 additions and 36 deletions
@@ -37,6 +37,7 @@ This test checks if the module satisfy tiny structure
self.module_score = 0.0
self.count = 0
self.recur = True
self.min_score = 30
return None
def run_test_struct(self, cr, uid, module_path):
@@ -139,6 +140,10 @@ This test checks if the module satisfy tiny structure
def run_test(self, cr, uid, module_path):
self.run_test_struct(cr, uid, module_path)
if self.score*100 < self.min_score:
self.message = 'Score is below than minimal score(%s%%)' % self.min_score
else:
self.message = ''
if self.score != 1:
self.result_details = self.get_result_details(self.result_dict)
return None