本文整理汇总了Python中sqla_plugin_base.set_coverage_flag方法的典型用法代码示例。如果您正苦于以下问题:Python sqla_plugin_base.set_coverage_flag方法的具体用法?Python sqla_plugin_base.set_coverage_flag怎么用?Python sqla_plugin_base.set_coverage_flag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sqla_plugin_base
的用法示例。
在下文中一共展示了sqla_plugin_base.set_coverage_flag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pytest_configure
# 需要导入模块: import sqla_plugin_base [as 别名]
# 或者: from sqla_plugin_base import set_coverage_flag [as 别名]
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)
示例2: pytest_configure
# 需要导入模块: import sqla_plugin_base [as 别名]
# 或者: from sqla_plugin_base import set_coverage_flag [as 别名]
def pytest_configure(config):
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)
示例3: pytest_configure
# 需要导入模块: import sqla_plugin_base [as 别名]
# 或者: from sqla_plugin_base import set_coverage_flag [as 别名]
def pytest_configure(config):
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_fixture_functions(PytestFixtureFunctions)
示例4: configure
# 需要导入模块: import sqla_plugin_base [as 别名]
# 或者: from sqla_plugin_base import set_coverage_flag [as 别名]
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)
示例5: pytest_configure
# 需要导入模块: import sqla_plugin_base [as 别名]
# 或者: from sqla_plugin_base import set_coverage_flag [as 别名]
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)