import doctest import unittest from Testing import ZopeTestCase as ztc from Products.Five import zcml from Products.PloneTestCase import PloneTestCase as ptc from Products.PloneTestCase.layer import PloneSite from Products.PloneTestCase.layer import onsetup import pf.biblioteca OPTION_FLAGS = doctest.NORMALIZE_WHITESPACE | \ doctest.ELLIPSIS ptc.setupPloneSite(products=['pf.biblioteca']) class TestCase(ptc.PloneTestCase): class layer(PloneSite): @classmethod def setUp(cls): zcml.load_config('configure.zcml', pf.biblioteca) @classmethod def tearDown(cls): pass def test_suite(): return unittest.TestSuite([ # Unit tests #doctestunit.DocFileSuite( # 'README.txt', package='pf.biblioteca', # setUp=testing.setUp, tearDown=testing.tearDown), #doctestunit.DocTestSuite( # module='pf.biblioteca.mymodule', # setUp=testing.setUp, tearDown=testing.tearDown), # Integration tests that use PloneTestCase ztc.ZopeDocFileSuite( 'INTEGRATION.txt', package='pf.biblioteca', optionflags = OPTION_FLAGS, test_class=TestCase), # -*- extra stuff goes here -*- ]) if __name__ == '__main__': unittest.main(defaultTest='test_suite')