from unittest import TestSuite from Testing import ZopeTestCase from Testing.ZopeTestCase import ZopeDocTestSuite from appy.gen.mixins.TestMixin import TestMixin, beforeTest, afterTest # Initialize the Zope test system ---------------------------------------------- ZopeTestCase.installProduct('') class Test(TestMixin, ZopeTestCase.ZopeTestCase): '''Base test class for test cases.''' # Data needed for defining the tests ------------------------------------------- data = {'test_class': Test, 'setUp': beforeTest, 'tearDown': afterTest, 'globs': {'appName': ''}} modulesWithTests = [] # ------------------------------------------------------------------------------ def test_suite(): return TestSuite([ZopeDocTestSuite(m, **data) for m in modulesWithTests]) # ------------------------------------------------------------------------------