source: main/trunk/openPLM/plmapp/tests/__init__.py @ 439

Revision 439, 1.9 KB checked in by pcosquer, 8 years ago (diff)

test: add run_coverage.sh

Line 
1############################################################################
2# openPLM - open source PLM
3# Copyright 2010 Philippe Joulaud, Pierre Cosquer
4#
5# This file is part of openPLM.
6#
7#    openPLM is free software: you can redistribute it and/or modify
8#    it under the terms of the GNU General Public License as published by
9#    the Free Software Foundation, either version 3 of the License, or
10#    (at your option) any later version.
11#
12#    openPLM is distributed in the hope that it will be useful,
13#    but WITHOUT ANY WARRANTY; without even the implied warranty of
14#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15#    GNU General Public License for more details.
16#
17#    You should have received a copy of the GNU General Public License
18#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
19#
20# Contact :
21#    Philippe Joulaud : ninoo.fr@gmail.com
22#    Pierre Cosquer : pierre.cosquer@insa-rennes.fr
23################################################################################
24
25from openPLM.plmapp.tests.filehandlers import *
26from openPLM.plmapp.tests.controllers import *
27from openPLM.plmapp.tests.lifecycle import *
28from openPLM.plmapp.tests.views import *
29from openPLM.plmapp.tests.ajax import *
30from openPLM.plmapp.tests.api import *
31from openPLM.plmapp.tests.csvimport import *
32
33import openPLM.plmapp.models
34from openPLM.plmapp.lifecycle import LifecycleList
35def get_doctest(module_name):
36    test_dict={}
37    module = __import__(module_name,{},{},module_name.split('.')[-1])
38    for obj_name,obj in module.__dict__.items():
39        if '__module__' in dir(obj) and obj.__module__ == module_name:
40            if obj.__doc__:
41                test_dict[obj_name] = obj
42                return test_dict
43
44__test__ = get_doctest("openPLM.plmapp.utils")
45__test__.update(get_doctest("openPLM.plmapp.controllers.plmobject"))
46__test__.update(get_doctest("openPLM.plmapp.lifecycle"))
47
Note: See TracBrowser for help on using the repository browser.