Exemplo n.º 1
0
def test_suite():
    optionflags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
    suite = unittest.TestSuite()
    suite.addTest(layered(
        doctest.DocFileSuite(
            'README.txt', package='plone.app.blob',
            optionflags=optionflags,
        ),
        layer=BlobLayer,
    ))

    for filename in ['replacement-types.txt', 'transforms.txt']:
        suite.addTest(layered(
            doctest.DocFileSuite(
                filename, package='plone.app.blob.tests',
                optionflags=optionflags,
            ),
            layer=BlobReplacementLayer,
        ))

    if hasLinguaPlone():
        suite.addTest(layered(
            doctest.DocFileSuite(
                'linguaplone.txt', package='plone.app.blob.tests',
                optionflags=optionflags,
            ),
            layer=BlobLinguaLayer,
        ))
    return suite
Exemplo n.º 2
0
def test_suite():
    suite = [
        layered(
            doctest.DocFileSuite(
                'README.txt',
                package='borg.localrole',
                optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
            ),
            layer=PLONE_INTEGRATION_TESTING),
        layered(
            doctest.DocTestSuite(
                borg.localrole.workspace,
                optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE),
                checker=Py23DocChecker(),
            ),
            layer=zca.UNIT_TESTING
        ),
        layered(
            doctest.DocTestSuite(
                factory_adapter,
                optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
            ),
            layer=zca.UNIT_TESTING
        ),
        doctest.DocTestSuite(default_adapter),
    ]
    return unittest.TestSuite(suite)
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([

        layered(doctest.DocFileSuite(
            'README.txt',
            package='collective.geo.mapwidget',
            tearDown=tearDown,
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | \
                doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
            ),
            layer=CGEO_MAPWIDGET_FUNCTIONAL
        ),

        layered(doctest.DocFileSuite(
            'controlpanel.txt',
            package='collective.geo.mapwidget.browser',
            tearDown=tearDown,
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | \
                doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
            ),
            layer=CGEO_MAPWIDGET_FUNCTIONAL
        ),
    ])
    return suite
Exemplo n.º 4
0
def test_suite():
    """ Suite
    """
    suite = unittest.TestSuite()
    suite.addTests([
        layered(
            doctest.DocFileSuite(
                'data/source.py',
                optionflags=OPTIONFLAGS,
                package='eea.daviz'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'README.txt',
                optionflags=OPTIONFLAGS,
                package='eea.daviz'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'docs/converter.txt',
                optionflags=OPTIONFLAGS,
                package='eea.daviz'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'docs/app.txt',
                optionflags=OPTIONFLAGS,
                package='eea.daviz'),
            layer=FUNCTIONAL_TESTING),
    ])
    return suite
Exemplo n.º 5
0
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, 'robot')
    robot_tests = [
        os.path.join('robot', doc) for doc in
        os.listdir(robot_dir) if doc.endswith('.robot') and
        doc.startswith('test_')
    ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(robottestsuite,
                    layer=PLONEAPPWIDGETS_DX_ROBOT_TESTING),
        ])

    robot_widgets_dir = os.path.join(current_dir, 'robot_widgets')
    robot_widgets_tests = [
        os.path.join('robot_widgets', doc) for doc in
        os.listdir(robot_widgets_dir) if doc.endswith('.robot') and
        doc.startswith('test_')
    ]
    for robot_test in robot_widgets_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(robottestsuite,
                    layer=SELECT_WIDGET_ROBOT_TESTING),
        ])

    return suite
Exemplo n.º 6
0
def test_suite():
    """ Suite
    """
    suite = unittest.TestSuite()
    suite.addTests([
        layered(
            doctest.DocFileSuite(
                'interfaces.py',
                optionflags=OPTIONFLAGS,
                package='eea.soercontent'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'browser/interfaces.py',
                optionflags=OPTIONFLAGS,
                package='eea.soercontent'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'content/interfaces.py',
                optionflags=OPTIONFLAGS,
                package='eea.soercontent'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'README.txt',
                optionflags=OPTIONFLAGS,
                package='eea.soercontent'),
            layer=FUNCTIONAL_TESTING),
    ])
    return suite
Exemplo n.º 7
0
def test_suite():
    """ Suite
    """
    suite = unittest.TestSuite()
    suite.addTests([
        layered(
            doctest.DocFileSuite(
                'README.txt',
                optionflags=OPTIONFLAGS,
                package='eea.faceted.inheritance'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'docs/browser.txt',
                optionflags=OPTIONFLAGS,
                package='eea.faceted.inheritance'),
            layer=FUNCTIONAL_TESTING),
        layered(
            doctest.DocFileSuite(
                'docs/inheritance.txt',
                optionflags=OPTIONFLAGS,
                package='eea.faceted.inheritance'),
            layer=FUNCTIONAL_TESTING),
      ])
    return suite
Exemplo n.º 8
0
def test_suite():
    # Some files need to be tested with the standard functional layer.
    ignored = UNITTESTS + CONTENT_TESTS
    standard_filenames = [
        filename for filename in
        glob.glob(os.path.sep.join([os.path.dirname(__file__), '*.txt']))
        if os.path.basename(filename) not in ignored]
    suites = [layered(doctest.DocFileSuite(
              os.path.basename(filename),
              optionflags=OPTIONFLAGS,
              package='Products.CMFPlone.tests',
              ), layer=PLONE_FUNCTIONAL_TESTING)
              for filename in standard_filenames]

    # Other files need to be tested with the plone.app.contenttypes layer.
    content_filenames = [
        filename for filename in
        glob.glob(os.path.sep.join([os.path.dirname(__file__), '*.txt']))
        if os.path.basename(filename) in CONTENT_TESTS]
    suites.extend(
        [layered(
            doctest.DocFileSuite(
                os.path.basename(filename),
                optionflags=OPTIONFLAGS,
                package='Products.CMFPlone.tests',
            ),
            layer=PLONE_APP_CONTENTTYPES_FUNCTIONAL_TESTING)
            for filename in content_filenames])

    return unittest.TestSuite(suites)
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([layered(robotsuite.RobotTestSuite("test_acceptance.robot"), layer=TASK_QUEUE_ROBOT_TESTING)])
    if HAS_REDIS and HAS_MSGPACK:
        suite.addTests(
            [layered(robotsuite.RobotTestSuite("test_acceptance.robot"), layer=REDIS_TASK_QUEUE_ROBOT_TESTING)]
        )
    return suite
Exemplo n.º 10
0
def test_suite():
    return unittest.TestSuite(
        [
            layered(robotsuite.RobotTestSuite("robot/base.robot"), layer=CKEDITOR_ROBOT),
            layered(robotsuite.RobotTestSuite("robot/scayt.robot"), layer=CKEDITOR_SCAYT_ROBOT),
            layered(robotsuite.RobotTestSuite("robot/image2.robot"), layer=CKEDITOR_IMAGE2_ROBOT),
        ]
    )
Exemplo n.º 11
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite("test_tabs.txt"),
                layer=TABS_ACCEPTANCE_TESTING),
        layered(robotsuite.RobotTestSuite("test_tabs_without_javascripts.txt"),
                layer=TABS_ACCEPTANCE_TESTING),
    ])
    return suite
Exemplo n.º 12
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(doctest.DocFileSuite('bookview.txt'),
                layer=FTW_BOOK_INTEGRATION_TESTING),
        layered(doctest.DocFileSuite('navigation.txt'),
                layer=FTW_BOOK_INTEGRATION_TESTING),
    ])
    return suite
def test_suite():
    tests = [layered(doctest.DocTestSuite('Products.AutoUserMakerPASPlugin.auth',
                                  optionflags=OPTIONFLAGS),
                     layer=AUTOUSERMAKERPASPLUGIN_FUNCTIONAL_TESTING),]
    tests.extend([layered(doctest.DocFileSuite(os.path.basename(filename),
                                        optionflags=OPTIONFLAGS),
                          layer=AUTOUSERMAKERPASPLUGIN_FUNCTIONAL_TESTING)
             for filename in listDoctests()])
    return unittest.TestSuite(tests)
Exemplo n.º 14
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests(
        [
            layered(doctest.DocFileSuite("barra.txt", optionflags=optionflags), layer=FUNCTIONAL_TESTING),
            layered(doctest.DocFileSuite("painel.txt", optionflags=optionflags), layer=FUNCTIONAL_TESTING),
        ]
    )
    return suite
Exemplo n.º 15
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite("robot_remote.txt"),
                layer=REMOTE_LIBRARY_FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("robot_add_document.txt"),
                layer=PLONE_ZSERVER),
    ])
    return suite
Exemplo n.º 16
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(doctest.DocFileSuite('../stagingbehavior.txt', optionflags = doctest.ELLIPSIS), 
                layer = FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('regressiontests.txt', optionflags = doctest.ELLIPSIS), 
                layer = FUNCTIONAL_TESTING),
    ])
    return suite
Exemplo n.º 17
0
def test_suite():
    suite = unittest.TestSuite()
    suite.level = ROBOT_TEST_LEVEL
    suite.addTests([
        layered(robotsuite.RobotTestSuite('robot'),
                layer=ShopATFull_ROBOT_TESTING),
        layered(robotsuite.RobotTestSuite('robot'),
                layer=ShopDXFull_ROBOT_TESTING),
    ])
    return suite
Exemplo n.º 18
0
def test_suite():
    return unittest.TestSuite((
        layered(doctest.DocFileSuite('browser.txt',
            optionflags=OPTIONFLAGS,
            package='Products.PasswordResetTool.tests',),
            layer=MM_FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('view.txt',
            optionflags=OPTIONFLAGS,
            package='Products.PasswordResetTool.tests',),
            layer=MM_FUNCTIONAL_TESTING)))
Exemplo n.º 19
0
def test_suite():
    suite = unittest.TestSuite()
    demo_suite = robotsuite.RobotTestSuite("demo")
    # demo disabled by default, to run use: bin/test -a 2
    demo_suite.level = 2
    suite.addTests([layered(demo_suite,
                            layer=PLONESOCIAL_ROBOT_TESTING), ])
    # functional tests ARE run by default - we have no unit tests
    suite.addTests([layered(robotsuite.RobotTestSuite('functional'),
                            layer=PLONESOCIAL_ROBOT_TESTING), ])
    return suite
Exemplo n.º 20
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite("twilio_controlpanel.txt"),
                layer=COLLECTIVE_TWOFACTOR_FUNCTIONAL_TESTING)
    ])
    suite.addTests([
        layered(robotsuite.RobotTestSuite("test_twofactor.txt"),
                layer=COLLECTIVE_TWOFACTOR_FUNCTIONAL_TESTING)
    ])
    return suite
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(doctest.DocFileSuite('tests/test_birthdays.txt',
                                     package='s17.employee'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('tests/test_base_behaviors.txt',
                                     package='s17.employee'),
                layer=FUNCTIONAL_TESTING),
        ])
    return suite
Exemplo n.º 22
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite('./robot/'
                'test_serveistic_is_installed.robot'),
                layer=ROBOT_TESTING),
        layered(robotsuite.RobotTestSuite('./robot/'
                'test_add_servei.robot'),
                layer=ROBOT_TESTING),
    ])
    return suite
Exemplo n.º 23
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite(
            os.path.join("acceptance", "standard")),
            layer=PLONE_ZSERVER),
        layered(robotsuite.RobotTestSuite(
            os.path.join("acceptance", "livesearch")),
            layer=LIVESEARCH_ZSERVER),
    ])
    return suite
def test_suite():
    return unittest.TestSuite(
        [layered(doctest.DocFileSuite('%s' % f, package='plone.multilingual',
                                      optionflags=optionflags),
                 layer=PLONEMULTILINGUAL_INTEGRATION_TESTING)
            for f in integration_tests]
        +
        [layered(doctest.DocFileSuite('%s' % f, package='plone.multilingual',
                                      optionflags=optionflags),
                 layer=PLONEMULTILINGUAL_FUNCTIONAL_TESTING)
            for f in functional_tests]
        )
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(
        layered(
            makeSuite(TestPortlet),
            layer=MULTIPORTLET_FUNCTIONAL_TESTING))
    suite.addTest(
        layered(
            makeSuite(TestRenderer),
            layer=MULTIPORTLET_FUNCTIONAL_TESTING))
    return suite
Exemplo n.º 26
0
def test_suite():
    return TestSuite([
        layered(doctest.DocFileSuite('browser.txt',
            package='collective.indexing.tests', optionflags=optionflags),
            layer=layer.SUBSCRIBER_FUNCTIONAL),
        layered(doctest.DocFileSuite('moveonwftransition.txt',
            package='collective.indexing.tests', optionflags=optionflags),
            layer=layer.INDEXING_FUNCTIONAL),
        layered(doctest.DocFileSuite('change-notes.txt',
            package='collective.indexing.tests', optionflags=optionflags),
            layer=layer.INDEXING_FUNCTIONAL),
    ])
Exemplo n.º 27
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(leveled(
            robotsuite.RobotTestSuite('robot'),
        ), layer=PLONE_APP_MOSAIC_ROBOT),
        layered(leveled(
            robotsuite.RobotTestSuite('robot',
                                      package='Products.CMFPlone.tests'),
        ), layer=PLONE_APP_MOSAIC_NO_PAC_ROBOT),
    ])
    return suite
Exemplo n.º 28
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests(
        [
            layered(doctest.DocFileSuite("simple.txt"), layer=PORTAL_TABS_FUNCTIONAL_TESTING),
            layered(doctest.DocFileSuite("edit.txt"), layer=PORTAL_TABS_FUNCTIONAL_TESTING),
            layered(doctest.DocFileSuite("add.txt"), layer=PORTAL_TABS_FUNCTIONAL_TESTING),
            layered(doctest.DocFileSuite("multiple_edit.txt"), layer=PORTAL_TABS_FUNCTIONAL_TESTING),
            layered(doctest.DocFileSuite("moving.txt"), layer=PORTAL_TABS_FUNCTIONAL_TESTING),
        ]
    )
    return suite
Exemplo n.º 29
0
def test_suite():
    return unittest.TestSuite((
        doctest.DocTestSuite('plone.app.i18n.locales.countries'),
        doctest.DocTestSuite('plone.app.i18n.locales.languages'),
        layered(doctest.DocFileSuite('countries.txt',
            optionflags=OPTIONFLAGS,
            package='plone.app.i18n.locales.tests',
            ), layer=PTC_FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('languages.txt',
            optionflags=OPTIONFLAGS,
            package='plone.app.i18n.locales.tests',
            ), layer=PTC_FUNCTIONAL_TESTING)
        ))
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite("test_export.robot"),
                layer=COLLECTIVE_THEMESITESETUP_ROBOT_TESTING),
        layered(robotsuite.RobotTestSuite("test_import.robot"),
                layer=COLLECTIVE_THEMESITESETUP_ROBOT_TESTING),
        layered(robotsuite.RobotTestSuite("test_enabled.robot"),
                layer=COLLECTIVE_THEMESITESETUP_ROBOT_TESTING),
        layered(robotsuite.RobotTestSuite("test_disabled.robot"),
                layer=COLLECTIVE_THEMESITESETUP_ROBOT_TESTING),
    ])
    return suite
Exemplo n.º 31
0
def test_suite():
    suite = [
        layered(doctest.DocFileSuite(
            'README.txt',
            package='borg.localrole',
            optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)),
                layer=PTC_FUNCTIONAL_TESTING),
        # Add the tests that register adapters at the end
        doctest.DocTestSuite(borg.localrole.workspace,
                             setUp=ztc.placeless.setUp(),
                             tearDown=ztc.placeless.tearDown(),
                             optionflags=doctest.ELLIPSIS
                             | doctest.NORMALIZE_WHITESPACE),
        doctest.DocTestSuite(factory_adapter),
        doctest.DocTestSuite(default_adapter),
    ]

    return unittest.TestSuite(suite)
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, 'robot')
    robot_tests = [
        os.path.join('robot', doc) for doc in os.listdir(robot_dir)
        if doc.endswith('.robot') and doc.startswith('test_')
    ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(
            robot_test,
            noncritical=['unstable'],
        )
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(robottestsuite, layer=PRODUCTS_CMFPLONE_ROBOT_TESTING),
        ])
    return suite
Exemplo n.º 33
0
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, "robot")
    robot_tests = [
        os.path.join("robot", doc) for doc in os.listdir(robot_dir)
        if doc.endswith(".robot") and doc.startswith("test_")
    ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(
                robottestsuite,
                layer=COLLECTIVE_CLASSIFICATION_FOLDER_ACCEPTANCE_TESTING,
            )
        ])
    return suite
Exemplo n.º 34
0
def test_suite():
    XMLConfig('testing/dummy_workflow.zcml', cone.app.tests)()
    suite = unittest.TestSuite()
    suite.addTests([
        layered(
            doctest.DocFileSuite(
                testfile,
                globs={
                    'interact': interlude.interact,
                    'pprint': pprint.pprint,
                    'pp': pprint.pprint,
                },
                optionflags=optionflags,
            ),
            layer=layer,
        ) for testfile in TESTFILES
    ])
    return suite
Exemplo n.º 35
0
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, 'robot')
    robot_tests = [
        os.path.join('robot', doc) for doc in os.listdir(robot_dir)
        if doc.endswith('.robot') and doc.startswith('test_')
    ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(
                robottestsuite,
                layer=PFTX_WEBSITE_ACCEPTANCE_TESTING,
            ),
        ])
    return suite
Exemplo n.º 36
0
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, "robot")
    robot_tests = [
        os.path.join("robot", doc) for doc in os.listdir(robot_dir)
        if doc.endswith(".robot") and doc.startswith("test_")
    ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(
                robottestsuite,
                layer=PLONETHEME_GRUEEZIBUESI_ACCEPTANCE_TESTING,
            ),
        ])
    return suite
Exemplo n.º 37
0
def test_suite():
    suite = TestSuite()
    if pingSolr():
        for testfile in [
                'errors.txt',
                'configlet.txt',
                'search.txt',
                'conflicts.txt',
                'facets.txt',
                'dependencies.txt',
                'collections.txt',
        ]:
            doc_suite = doctest.DocFileSuite(testfile,
                                             package='collective.solr.tests',
                                             optionflags=optionflags)
            layer = layered(doc_suite,
                            layer=COLLECTIVE_SOLR_FUNCTIONAL_TESTING)
            suite.addTest(layer)
    return suite
Exemplo n.º 38
0
def test_suite():
    suite = unittest.TestSuite()
    for testfile in os.listdir(
            os.path.join(os.path.dirname(__file__), "acceptance")):
        testfilepath = os.path.join("acceptance", testfile)
        if os.path.isdir(testfilepath):
            continue

        if testfile.endswith(".robot"):
            suite.addTests([
                layered(
                    robotsuite.RobotTestSuite(
                        testfilepath,
                        noncritical=["fixme", "noncritical", "heisenbug"],
                    ),
                    layer=OIRA_SUITE_ROBOT,
                ),
            ])
    return suite
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(robotsuite.RobotTestSuite("test_cover.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_layout.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_basic_tile.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_collection_tile.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_embed_tile.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_file_tile.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_image_tile.txt"),
                layer=FUNCTIONAL_TESTING),
        layered(robotsuite.RobotTestSuite("test_list_tile.txt"),
                layer=FUNCTIONAL_TESTING),
    ])
    return suite
Exemplo n.º 40
0
def test_suite():
    layout_txt = layered(
        doctest.DocFileSuite('layout.rst', checker=Py23DocChecker()),
        layer=FUNCTIONAL_TESTING,
    )
    inputs_txt = layered(
        doctest.DocFileSuite('inputs.txt', checker=Py23DocChecker()),
        layer=FUNCTIONAL_TESTING,
    )
    fieldsets_txt = layered(
        doctest.DocFileSuite('fieldsets/README.rst', checker=Py23DocChecker()),
        layer=FUNCTIONAL_TESTING,
    )

    traversal_txt = layered(
        doctest.DocFileSuite('traversal.txt', checker=Py23DocChecker()),
        layer=FUNCTIONAL_TESTING,
    )
    crud_readme_txt = layered(
        doctest.DocFileSuite('crud/README.txt', checker=Py23DocChecker()),
        layer=zca.UNIT_TESTING,
    )
    crud_py = layered(
        doctest.DocTestSuite(
            'plone.z3cform.crud.crud',
            setUp=testing.setUp,
            tearDown=testing.tearDown,
            checker=Py23DocChecker(),
        ),
        layer=zca.UNIT_TESTING,
    )
    traversal_txt = layered(
        doctest.DocFileSuite('traversal.txt', checker=Py23DocChecker()),
        layer=FUNCTIONAL_TESTING,
    )
    suite = unittest.defaultTestLoader.loadTestsFromTestCase(Z2TestCase)
    suite.addTests([
        layout_txt,
        inputs_txt,
        fieldsets_txt,
        traversal_txt,
        crud_readme_txt,
        crud_py,
    ])
    return suite
Exemplo n.º 41
0
def test_suite():
    suite = unittest.TestSuite()
    my_dir = os.path.dirname(__file__)
    docs = os.path.join('..', '..', '..', 'docs')
    registerConfiguration = PLONEBLUEPRINTS_FUNCTIONAL_TESTING \
        .baseResolutionOrder[1].registerConfiguration
    for filename in os.listdir(os.path.join(my_dir, docs)):
        path = os.path.join(docs, filename)
        globs = {
            'registerConfiguration': registerConfiguration,
            'ITransmogrifier': ITransmogrifier,
            'api': api,
            'logger': InstalledHandler('logger', level=logging.INFO)
        }
        flags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
        suite.addTests([
            layered(doctest.DocFileSuite(path, globs=globs, optionflags=flags),
                    layer=PLONEBLUEPRINTS_FUNCTIONAL_TESTING)
        ])
    return suite
Exemplo n.º 42
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests(
        [
            layered(
                doctest.DocFileSuite(
                    f,
                    optionflags=optionflags,
                    globs={
                        "get_browser": get_browser,
                        "get_image_path": get_image_path,
                    },
                    checker=Py23DocChecker(),
                ),
                layer=FUNCTIONAL_TESTING,
            )
            for f in testfiles
        ]
    )
    return suite
Exemplo n.º 43
0
def test_suite():
    """ Suite
    """
    suite = unittest.TestSuite()
    suite.addTests([
        layered(doctest.DocFileSuite('interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('content/interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('controlpanel/interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('widgets/interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('storage/interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('widgets/simple/interfaces.py',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('docs/exportimport.txt',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
        layered(doctest.DocFileSuite('README.txt',
                                     optionflags=OPTIONFLAGS,
                                     package='eea.progressbar'),
                layer=FUNCTIONAL_TESTING),
    ])
    return suite
Exemplo n.º 44
0
def test_suite():
    suite = unittest.TestSuite()
    for testfile in os.listdir(
            os.path.join(os.path.dirname(__file__), "acceptance")):
        testfilepath = os.path.join("acceptance", testfile)
        if os.path.isdir(testfilepath):
            continue
        if testfile.endswith('.solr.robot'):

            # FIXME mixing solr and non-solr layers breaks
            # skipping library solr tests for now
            continue

        if testfile.endswith('.robot'):
            suite.addTests([
                layered(robotsuite.RobotTestSuite(
                    testfilepath,
                    noncritical=['fixme', 'noncritical', 'heisenbug']),
                        layer=PLONEINTRANET_SUITE_ROBOT),
            ])
    return suite
Exemplo n.º 45
0
def test_suite():
    suite = unittest.TestSuite()
    no_robot = 'NO_ROBOT' in os.environ.keys()
    if no_robot or api.env.plone_version() < '4.2':
        # No robot tests for Plone 4.1.x
        return suite

    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, 'robot')
    robot_tests = [
        os.path.join('robot', doc) for doc in os.listdir(robot_dir)
        if doc.startswith('test') and doc.endswith('.robot')
    ]
    for test in robot_tests:
        suite.addTests([
            layered(
                robotsuite.RobotTestSuite(test),
                layer=testing.ROBOT_TESTING,
            ),
        ])
    return suite
Exemplo n.º 46
0
def test_suite():
    from unittest import TestSuite
    from Testing.ZopeTestCase.zopedoctest import ZopeDocFileSuite

    optionflags = doctest.REPORT_ONLY_FIRST_FAILURE | doctest.ELLIPSIS
    suites = []

    scriptTests = [
        'search_treevocabulary.txt',
        'simplevocabulary.txt',
    ]

    for test in scriptTests:
        suites.append(
            layered(doctest.DocFileSuite(
                test,
                optionflags=optionflags,
                globs={'createTestVocabulary': createTestVocabulary},
                package='Products.ATVocabularyManager.doc',
            ),
                    layer=AT_FUNCTIONAL_TESTING))
    return TestSuite(suites)
Exemplo n.º 47
0
def test_suite():
    logger = logging.getLogger('collective.js.leaflet.tests')
    cwd = os.path.dirname(__file__)
    files = []
    try:
        files = glob.glob(os.path.join(cwd, '*txt'))
    except Exception:
        logger.warn('No doctests for collective.js.leaflet')
    suite = unittest.TestSuite()
    globs = globals()
    for s in files:
        suite.addTests([
            layered(
                doctest.DocFileSuite(
                    s,
                    globs=globs,
                    module_relative=False,
                    optionflags=optionflags,
                ),
                layer=CJL_FUNCTIONAL_TESTING
            ),
        ])
    return suite
Exemplo n.º 48
0
def DocFileSuite(testfile, flags=FLAGS, setUp=setUp, layer=INTEGRATION_TESTING):
    """Returns a test suite configured with a test layer.

    :param testfile: Path to a doctest file.
    :type testfile: str

    :param flags: Doctest test flags.
    :type flags: int

    :param setUp: Test set up function.
    :type setUp: callable

    :param layer: Test layer
    :type layer: object

    :rtype: `manuel.testing.TestSuite`
    """
    m = manuel.doctest.Manuel(optionflags=flags, checker=CHECKER)
    m += manuel.codeblock.Manuel()

    return layered(
        manuel.testing.TestSuite(m, testfile, setUp=setUp, globs=dict(layer=layer)),
        layer=layer)
Exemplo n.º 49
0
def test_suite():

    inlineValidationTests = zope.testing.doctest.DocFileSuite(
        'inline_validation.txt',
        package='plone.app.z3cform',
        optionflags=(zope.testing.doctest.ELLIPSIS
                     | zope.testing.doctest.NORMALIZE_WHITESPACE))

    inlineValidationTests.layer = InlineValidationLayer

    robottestsuite = robotsuite.RobotTestSuite("test_multi.txt")
    robottestsuite.level = ROBOT_TEST_LEVEL
    robotTests = layered(robottestsuite, layer=FUNCTIONAL_TESTS)

    return unittest.TestSuite([
        unittest.makeSuite(IntegrationTests),
        zope.testing.doctest.DocFileSuite(
            'wysiwyg/README.txt',
            package='plone.app.z3cform',
            setUp=zope.component.testing.setUp,
            tearDown=zope.component.testing.tearDown,
        ),
        zope.testing.doctest.DocFileSuite(
            'queryselect/README.txt',
            package='plone.app.z3cform',
            setUp=zope.component.testing.setUp,
            tearDown=zope.component.testing.tearDown,
        ),
        zope.testing.doctest.DocTestSuite(
            'plone.app.z3cform.wysiwyg.widget',
            package='plone.app.z3cform',
            setUp=zope.component.testing.setUp,
            tearDown=zope.component.testing.tearDown,
        ),
        inlineValidationTests,
        robotTests,
    ])
Exemplo n.º 50
0
def test_suite():
    location = os.path.dirname(__file__) or "."
    doctests = [
        "stories/" + os.path.basename(test)
        for test in glob.glob(os.path.join(location, "stories", "*.txt"))
    ]

    options = (doctest.REPORT_ONLY_FIRST_FAILURE
               | doctest.ELLIPSIS
               | doctest.NORMALIZE_WHITESPACE)

    suites = [
        layered(
            doctest.DocFileSuite(
                test,
                optionflags=options,
                module_relative=True,
                package="euphorie.client.tests",
                encoding="utf-8",
            ),
            layer=EUPHORIE_FUNCTIONAL_TESTING,
        ) for test in doctests
    ]
    return unittest.TestSuite(suites)
Exemplo n.º 51
0
def test_suite():
    inlineValidationTests = layered(doctest.DocFileSuite(
        'inline_validation.rst',
        package='plone.app.z3cform',
        optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)),
                                    layer=PAZ3CForm_INTEGRATION_TESTING)

    suite = unittest.TestSuite([
        unittest.makeSuite(IntegrationTests),
        doctest.DocFileSuite(
            'wysiwyg/README.rst',
            package='plone.app.z3cform',
            setUp=zope.component.testing.setUp,
            tearDown=zope.component.testing.tearDown,
        ),
        doctest.DocTestSuite(
            'plone.app.z3cform.wysiwyg.widget',
            package='plone.app.z3cform',
            setUp=zope.component.testing.setUp,
            tearDown=zope.component.testing.tearDown,
        ),
        inlineValidationTests,
    ])
    return suite
Exemplo n.º 52
0
def test_suite():
    suite = unittest.TestSuite()
    current_dir = os.path.abspath(os.path.dirname(__file__))
    robot_dir = os.path.join(current_dir, 'robot')
    if IS_PLONE_5:
        robot_tests = [
            os.path.join('robot', doc) for doc in os.listdir(robot_dir)
            if doc.endswith('.p5.robot') and doc.startswith('test_')
        ]
    else:
        robot_tests = [
            os.path.join('robot', doc) for doc in os.listdir(robot_dir)
            if doc.endswith('.p4.robot') and doc.startswith('test_')
        ]
    for robot_test in robot_tests:
        robottestsuite = robotsuite.RobotTestSuite(robot_test)
        robottestsuite.level = ROBOT_TEST_LEVEL
        suite.addTests([
            layered(
                robottestsuite,
                layer=COLLECTIVE_MESSAGESVIEWLET_ACCEPTANCE_TESTING,
            ),
        ])
    return suite
Exemplo n.º 53
0
def test_suite():
    suite = unittest.TestSuite()
    suite.addTests([
        layered(
            robotsuite.RobotTestSuite("test_autologin_library.robot"),
            layer=SIMPLE_PUBLICATION_ROBOT_TESTING,
        ),
        layered(
            robotsuite.RobotTestSuite("test_content_library.robot"),
            layer=SIMPLE_PUBLICATION_ROBOT_TESTING,
        ),
        # layered(
        #     robotsuite.RobotTestSuite("test_quickinstaller_library.robot"),
        #     layer=REMOTE_LIBRARY_ROBOT_TESTING,
        # ),
        layered(
            robotsuite.RobotTestSuite("test_i18n_library.robot"),
            layer=PLONE_ROBOT_TESTING,
        ),
        layered(
            robotsuite.RobotTestSuite("test_users_library.robot"),
            layer=PLONE_ROBOT_TESTING,
        ),
        layered(robotsuite.RobotTestSuite("docs"), layer=PLONE_ROBOT_TESTING),
    ])

    if HAS_SPEAKJS:
        from plone.app.robotframework.testing import SPEAKJS_ROBOT_TESTING

        suite.addTests([
            layered(
                robotsuite.RobotTestSuite(
                    "test_speakjs_library.robot",
                    noncritical=['non-critical'],
                ),
                layer=SPEAKJS_ROBOT_TESTING,
            )
        ])
    return suite
Exemplo n.º 54
0
def test_suite():
    return layered(doctest.DocFileSuite('tests.txt', optionflags=optionflags),
                   layer=testing.MY_RECENT_FUNCTIONAL_TESTING)
Exemplo n.º 55
0

def test_suite():
    """."""
    logger = logging.getLogger('collective.z3cform.chosen.tests')
    cwd = os.path.dirname(__file__)
    pcwd = os.path.dirname(os.path.dirname(__file__))
    files = []
    try:
        files = glob.glob(os.path.join(cwd, '*txt'))
        files.extend(glob.glob(os.path.join(pcwd, '*txt')))
        files = [f for f in files if not 'version.txt' in f]
    except Exception, e:
        logger.warn('No doctests for collective.z3cform.chosen')
    suite = unittest.TestSuite()
    globs = globals()
    for s in files:
        suite.addTests([
            layered(doctest.DocFileSuite(
                s,
                globs=globs,
                module_relative=False,
                optionflags=optionflags,
            ),
                    layer=FUNCTIONAL_TESTING),
        ])
    return suite


# vim:set ft=python:
Exemplo n.º 56
0
def test_suite():
    return unittest.TestSuite([
        layered(doctest.DocFileSuite(f, optionflags=doctest.ELLIPSIS),
                layer=PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING) for f in tests
    ])
Exemplo n.º 57
0
def test_suite():
    return unittest.TestSuite(
        [layered(doctest.DocFileSuite('README.rst', package='plone.browserlayer',
         optionflags=doctest.ELLIPSIS | doctest.REPORT_ONLY_FIRST_FAILURE),
         layer=PLONEBROWSERLAYER_FUNCTIONAL_TESTING)]
    )
Exemplo n.º 58
0
def test_suite():
    return unittest.TestSuite(
        [layered(doctest.DocFileSuite(f, optionflags=doctest.ELLIPSIS),
                 layer=DEXTERITY_FUNCTIONAL_TESTING)
            for f in tests]
    )
Exemplo n.º 59
0
def test_suite():
    return unittest.TestSuite(
        (layered(doctest.DocFileSuite('test_tiles_esi_support.rst'),
                 layer=FUNCTIONAL_TESTING), ))
Exemplo n.º 60
0
def test_suite():
    return unittest.TestSuite([
        layered(doctest.DocFileSuite('README.rst', package='edrnsite.misccontent', optionflags=optionFlags), LAYER),
    ])