Back to index

plone3  3.1.7
test_doctests.py
Go to the documentation of this file.
00001 ################################################################################
00002 #
00003 # Copyright (c) 2002-2005, Benjamin Saller <bcsaller@ideasuite.com>, and
00004 #                              the respective authors. All rights reserved.
00005 # For a list of Archetypes contributors see docs/CREDITS.txt.
00006 #
00007 # Redistribution and use in source and binary forms, with or without
00008 # modification, are permitted provided that the following conditions are met:
00009 #
00010 # * Redistributions of source code must retain the above copyright notice, this
00011 #   list of conditions and the following disclaimer.
00012 # * Redistributions in binary form must reproduce the above copyright notice,
00013 #   this list of conditions and the following disclaimer in the documentation
00014 #   and/or other materials provided with the distribution.
00015 # * Neither the name of the author nor the names of its contributors may be used
00016 #   to endorse or promote products derived from this software without specific
00017 #   prior written permission.
00018 #
00019 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00020 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00021 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00022 # FOR A PARTICULAR PURPOSE.
00023 #
00024 ################################################################################
00025 """
00026 """
00027 
00028 __author__ = 'Christian Heimes'
00029 __docformat__ = 'restructuredtext'
00030 
00031 from Testing.ZopeTestCase import FunctionalDocFileSuite as FileSuite
00032 
00033 # a list of dotted paths to modules which contains doc tests
00034 DOCTEST_MODULES = (
00035     'Products.Archetypes.utils',
00036     'Products.Archetypes.Schema',
00037     'Products.Archetypes.ArchetypeTool',
00038     'Products.Archetypes.AllowedTypesByIface',
00039     'Products.Archetypes.Field',
00040     'Products.Archetypes.Marshall',
00041     'Products.Archetypes.fieldproperty',
00042     'Products.Archetypes.browser.widgets',
00043     )
00044 
00045 DOCTEST_FILES = ('events.txt',
00046                  'editing.txt')
00047 
00048 from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
00049 from Products.Archetypes.tests.atsitetestcase import ATFunctionalSiteTestCase
00050 from Products.Archetypes.tests.doctestcase import ZopeDocTestSuite
00051 
00052 def test_suite():
00053     suite = ZopeDocTestSuite(test_class=ATSiteTestCase,
00054                              extraglobs={},
00055                              *DOCTEST_MODULES
00056                              )
00057     for file in DOCTEST_FILES:
00058         suite.addTest(FileSuite(file, package="Products.Archetypes.tests",
00059                                 test_class=ATFunctionalSiteTestCase)
00060                      )
00061     return suite