Back to index

plone3  3.1.7
test_doctest.py
Go to the documentation of this file.
00001 import unittest
00002 import doctest
00003 
00004 from zope.interface import Interface
00005 
00006 from Products.Five import zcml
00007 from Products.Five import fiveconfigure
00008 
00009 from Products.PloneTestCase import PloneTestCase as ptc
00010 from Products.PloneTestCase.layer import PloneSite
00011 from Testing import ZopeTestCase as ztc
00012 
00013 import plone.theme
00014 import plone.theme.tests
00015 
00016 ptc.setupPloneSite()
00017 
00018 class PloneThemeLayer(PloneSite):
00019     @classmethod
00020     def setUp(cls):
00021         fiveconfigure.debug_mode = True
00022         zcml.load_config('configure.zcml', plone.theme)
00023         zcml.load_config('tests.zcml', plone.theme.tests)
00024         fiveconfigure.debug_mode = False
00025 
00026     @classmethod
00027     def tearDown(cls):
00028         pass
00029     
00030 
00031 class PloneThemeTestCase(ptc.FunctionalTestCase):
00032     layer = PloneThemeLayer
00033 
00034 def test_suite():
00035     return unittest.TestSuite([
00036 
00037         # Demonstrate the main content types
00038         ztc.ZopeDocFileSuite(
00039             'README.txt', package='plone.theme',
00040             test_class=PloneThemeTestCase,
00041             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
00042             
00043         ])
00044 
00045 if __name__ == '__main__':
00046     unittest.main(defaultTest='test_suite')