From 94199a484783d91317c8decb273ab60447ffdfd7 Mon Sep 17 00:00:00 2001 From: sebpiq Date: Fri, 11 Mar 2011 12:00:51 +0200 Subject: [PATCH] modified tests.__init__ so it also test module docstrings --- djangorestframework/tests/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/djangorestframework/tests/__init__.py b/djangorestframework/tests/__init__.py index 7ac544196..55e386b52 100644 --- a/djangorestframework/tests/__init__.py +++ b/djangorestframework/tests/__init__.py @@ -5,5 +5,10 @@ modules = [filename.rsplit('.', 1)[0] for filename in os.listdir(os.path.dirname(__file__)) if filename.endswith('.py') and not filename.startswith('_')] +__test__ = dict() + for module in modules: - exec("from djangorestframework.tests.%s import *" % module) \ No newline at end of file + exec("from djangorestframework.tests.%s import __doc__ as module_doc" % module) + exec("from djangorestframework.tests.%s import *" % module) + __test__['%s' % module] = module_doc or "" +