コード例 #1
0
ファイル: conftest.py プロジェクト: yutiansut/ilastik
def pytest_runtestloop(session):
    """
    Gui test runner
    """
    if session.testsfailed and not session.config.option.continue_on_collection_errors:
        raise session.Interrupted("%d errors during collection" %
                                  session.testsfailed)

    if session.config.option.collectonly:
        return True

    # Modify session leaving only normal tests as session.items
    # Gui test should be run separately
    guitests, session.items = split_guitests(session.items)

    if session.config.getoption("run_legacy_gui"):
        for tstcls, gui_test_bag in itertools.groupby(
                _sorted_guitests(guitests), get_guitest_cls):
            run_gui_tests(tstcls, gui_test_bag)
            ThreadRouter.app_is_shutting_down = False

    elif guitests:
        warnings.warn(
            "Skipping legacy GUI test to enable please use --run-legacy-gui option\n"
        )

    _pytest_runtestloop(session)

    return True
コード例 #2
0
ファイル: conftest.py プロジェクト: ilastik/ilastik
def pytest_runtestloop(session):
    """
    Gui test runner
    """
    if session.testsfailed and not session.config.option.continue_on_collection_errors:
        raise session.Interrupted("%d errors during collection" % session.testsfailed)

    if session.config.option.collectonly:
        return True

    # Modify session leaving only normal tests as session.items
    # Gui test should be run separately
    guitests, session.items = split_guitests(session.items)
    _pytest_runtestloop(session)

    if session.config.getoption('run_legacy_gui'):
        for tstcls, gui_test_bag in itertools.groupby(_sorted_guitests(guitests), get_guitest_cls):
            run_gui_tests(tstcls, gui_test_bag)

    elif guitests:
        warnings.warn(
            "Skipping legacy GUI test to enable please use --run-legacy-gui option\n"
        )

    return True