If the log entry comes from structlog, it's unpackaged and processed.
(self, capsys)
| 1349 | assert 2 == err.count("Stack (most recent call last):") |
| 1350 | |
| 1351 | def test_native(self, capsys): |
| 1352 | """ |
| 1353 | If the log entry comes from structlog, it's unpackaged and processed. |
| 1354 | """ |
| 1355 | eds = configure_logging(None) |
| 1356 | |
| 1357 | get_logger().warning("foo") |
| 1358 | |
| 1359 | assert ( |
| 1360 | "", |
| 1361 | "[warning ] foo [in test_native]\n", |
| 1362 | ) == capsys.readouterr() |
| 1363 | assert eds[0]["_from_structlog"] is True |
| 1364 | assert isinstance(eds[0]["_record"], logging.LogRecord) |
| 1365 | |
| 1366 | def test_native_logger(self, capsys): |
| 1367 | """ |
nothing calls this directly
no test coverage detected