Files
odoo_source/addons/base_module_quality/base_module_quality.py
T
qdp cd6b3e1941 improvement of base_module_quality:
*changed signature of run_test() method, added cr and uid
*switched wizard to osv_memory, to use text_wiki in the result window
*improved method_test.py, added score computation, corrected self.bool_installed_only var, use text_wiki widget
*implemented speed_test.py, first throw
*improvement of base_module_quality/wizard/module_quality_check.py

bzr revid: qdp@tinyerp.com-20081223155847-4qm6095jomgwvuju
2008-12-23 16:58:47 +01:00

62 lines
2.0 KiB
Python

# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
class abstract_quality_check(object):
'''
This Class provide...
'''
#This float have to store the rating of the module.
#Used to compute the final score (average of all scores).
score = 0.0
#This char have to store the result.
#Used to display the result of the test.
result = ""
#This char have to store the result with more details.
#Used to provide more details if necessary.
result_details = ""
#This bool defines if the test can be run only if the module is installed.
#True => the module have to be installed.
#False => the module can be uninstalled.
bool_installed_only = True
def __init__(self):
'''
this method should initialize the var
'''
raise 'Not Implemented'
def run_test(self, cr, uid, module_path=""):
'''
this method should do the test and fill the score, result and result_details var
'''
raise 'Not Implemented'
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: