(config: Config)
| 130 | |
| 131 | |
| 132 | def pytest_configure(config: Config) -> None: |
| 133 | with ExitStack() as stack: |
| 134 | stack.enter_context( |
| 135 | catch_warnings_for_item( |
| 136 | config=config, |
| 137 | ihook=config.hook, |
| 138 | when="config", |
| 139 | item=None, |
| 140 | # this disables recording because the terminalreporter has |
| 141 | # finished by the time it comes to reporting logged warnings |
| 142 | # from the end of config cleanup. So for now, this is only |
| 143 | # useful for setting a warning filter with an 'error' action. |
| 144 | record=False, |
| 145 | ) |
| 146 | ) |
| 147 | config.addinivalue_line( |
| 148 | "markers", |
| 149 | "filterwarnings(warning): add a warning filter to the given test. " |
| 150 | "see https://docs.pytest.org/en/stable/how-to/capture-warnings.html#pytest-mark-filterwarnings ", |
| 151 | ) |
| 152 | config.add_cleanup(stack.pop_all().close) |
nothing calls this directly
no test coverage detected