(config: pytest.Config)
| 82 | |
| 83 | |
| 84 | def pytest_configure(config: pytest.Config): |
| 85 | plugin_base.read_config(config.rootpath) |
| 86 | if plugin_base.exclude_tags or plugin_base.include_tags: |
| 87 | new_expr = " and ".join( |
| 88 | list(plugin_base.include_tags) |
| 89 | + [f"not {tag}" for tag in plugin_base.exclude_tags] |
| 90 | ) |
| 91 | |
| 92 | if config.option.markexpr: |
| 93 | config.option.markexpr += f" and {new_expr}" |
| 94 | else: |
| 95 | config.option.markexpr = new_expr |
| 96 | |
| 97 | if config.pluginmanager.hasplugin("xdist"): |
| 98 | config.pluginmanager.register(XDistHooks()) |
| 99 | |
| 100 | if hasattr(config, "workerinput"): |
| 101 | plugin_base.restore_important_follower_config(config.workerinput) |
| 102 | plugin_base.configure_follower(config.workerinput["follower_ident"]) |
| 103 | else: |
| 104 | if config.option.write_idents and os.path.exists( |
| 105 | config.option.write_idents |
| 106 | ): |
| 107 | os.remove(config.option.write_idents) |
| 108 | |
| 109 | plugin_base.pre_begin(config.option) |
| 110 | |
| 111 | plugin_base.set_coverage_flag( |
| 112 | bool(getattr(config.option, "cov_source", False)) |
| 113 | ) |
| 114 | |
| 115 | plugin_base.set_fixture_functions(PytestFixtureFunctions) |
| 116 | |
| 117 | if config.option.dump_pyannotate: |
| 118 | global DUMP_PYANNOTATE |
| 119 | DUMP_PYANNOTATE = True |
| 120 | |
| 121 | |
| 122 | DUMP_PYANNOTATE = False |
nothing calls this directly
no test coverage detected