def pytest_configure(config): if plugin_base.exclude_tags or plugin_base.include_tags: new_expr = " and ".join( list(plugin_base.include_tags) + [f"not {tag}" for tag in plugin_base.exclude_tags] ) if config.option.markexpr: config.option.markexpr += f" and {new_expr}" else: config.option.markexpr = new_expr if config.pluginmanager.hasplugin("xdist"): config.pluginmanager.register(XDistHooks()) if hasattr(config, "workerinput"): plugin_base.restore_important_follower_config(config.workerinput) plugin_base.configure_follower(config.workerinput["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) if config.option.dump_pyannotate: global DUMP_PYANNOTATE DUMP_PYANNOTATE = True
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)
def pytest_configure(config): pytest.register_assert_rewrite("sqlalchemy.testing.assertions") if hasattr(config, "workerinput"): plugin_base.restore_important_follower_config(config.workerinput) plugin_base.configure_follower(config.workerinput["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)
def pytest_configure(config): if hasattr(config, "workerinput"): plugin_base.restore_important_follower_config(config.workerinput) plugin_base.configure_follower(config.workerinput["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) if config.option.dump_pyannotate: global DUMP_PYANNOTATE DUMP_PYANNOTATE = True
def pytest_configure(config): spc(config) plugin_base.set_fixture_functions(PytestFixtureFunctions)