(caplog)
| 153 | |
| 154 | @pytest.fixture |
| 155 | def logging_during_setup_and_teardown(caplog): |
| 156 | caplog.set_level("INFO") |
| 157 | logger.info("a_setup_log") |
| 158 | yield |
| 159 | logger.info("a_teardown_log") |
| 160 | assert [x.message for x in caplog.get_records("teardown")] == ["a_teardown_log"] |
| 161 | |
| 162 | |
| 163 | def test_caplog_captures_for_all_stages(caplog, logging_during_setup_and_teardown): |
nothing calls this directly
no test coverage detected