Ejemplo n.º 1
0
    def configure(self, options, conf):
        super(NoseSQLAlchemy, self).configure(options, conf)
        plugin_base.pre_begin(options)

        plugin_base.set_coverage_flag(options.enable_plugin_coverage)

        plugin_base.set_skip_test(nose.SkipTest)
Ejemplo n.º 2
0
def pytest_configure(config):
    if hasattr(config, "slaveinput"):
        plugin_base.restore_important_follower_config(config.slaveinput)
        plugin_base.configure_follower(config.slaveinput["follower_ident"])

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(bool(getattr(config.option, "cov_source", False)))

    plugin_base.set_skip_test(pytest.skip.Exception)
Ejemplo n.º 3
0
def pytest_configure(config):
    if hasattr(config, "slaveinput"):
        plugin_base.restore_important_follower_config(config.slaveinput)
        plugin_base.configure_follower(config.slaveinput["follower_ident"])

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(
        bool(getattr(config.option, "cov_source", False)))

    plugin_base.set_skip_test(pytest.skip.Exception)
def pytest_configure(config):
    if hasattr(config, "subordinateinput"):
        plugin_base.restore_important_follower_config(config.subordinateinput)
        plugin_base.configure_follower(
            config.subordinateinput["follower_ident"])
    else:
        if config.option.write_idents and os.path.exists(
                config.option.write_idents):
            os.remove(config.option.write_idents)

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(
        bool(getattr(config.option, "cov_source", False)))

    plugin_base.set_skip_test(pytest.skip.Exception)
Ejemplo n.º 5
0
def pytest_configure(config):
    if hasattr(config, "slaveinput"):
        plugin_base.restore_important_follower_config(config.slaveinput)
        plugin_base.configure_follower(config.slaveinput["follower_ident"])

        if config.option.write_idents:
            with open(config.option.write_idents, "a") as file_:
                file_.write(config.slaveinput["follower_ident"] + "\n")
    else:
        if config.option.write_idents and \
                os.path.exists(config.option.write_idents):
            os.remove(config.option.write_idents)

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(
        bool(getattr(config.option, "cov_source", False)))

    plugin_base.set_skip_test(pytest.skip.Exception)
Ejemplo n.º 6
0
def pytest_configure(config):
    pytest.register_assert_rewrite("sqlalchemy.testing.assertions")

    if hasattr(config, "slaveinput"):
        plugin_base.restore_important_follower_config(config.slaveinput)
        plugin_base.configure_follower(config.slaveinput["follower_ident"])
    else:
        if config.option.write_idents and os.path.exists(
            config.option.write_idents
        ):
            os.remove(config.option.write_idents)

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(
        bool(getattr(config.option, "cov_source", False))
    )

    plugin_base.set_skip_test(pytest.skip.Exception)
Ejemplo n.º 7
0
def pytest_configure(config):
    if hasattr(config, "slaveinput"):
        plugin_base.restore_important_follower_config(config.slaveinput)
        plugin_base.configure_follower(
            config.slaveinput["follower_ident"]
        )

        if config.option.write_idents:
            with open(config.option.write_idents, "a") as file_:
                file_.write(config.slaveinput["follower_ident"] + "\n")
    else:
        if config.option.write_idents and \
                os.path.exists(config.option.write_idents):
            os.remove(config.option.write_idents)

    plugin_base.pre_begin(config.option)

    plugin_base.set_coverage_flag(bool(getattr(config.option,
                                               "cov_source", False)))

    plugin_base.set_skip_test(pytest.skip.Exception)