pytest-catchlog icon indicating copy to clipboard operation
pytest-catchlog copied to clipboard

py.test plugin to catch log messages. Forked from pytest-capturelog. Pull Requests are welcome!

Results 13 pytest-catchlog issues
Sort by recently updated
recently updated
newest added

When using the pytest-flake8 plugin the flake logs get catched by pytest-catchlog, making it difficult to see the actual flake error output: `======== FAILURES ======== _______ FLAKE8-check _______ /home/user/Projects/test/test.py:12:5: F841...

What is the recommended way to handle loggers that are configured with `propagate=False`, which appears to cause the message not to reach the caplog handler? I can manually change the...

On test case completion all modifications to loggers levels are reversed. Fixes #60

* .grep has an extensive doc comment, very compact code. * The tests seem exhaustive. * All tests pass.

This allows to override --no-print-logs from e.g. setup.cfg. Includes flake8 fixes from #64 to avoid conflicts.

I find myself often using the following construct when asserting if a certain log message has been recorded: ```py import logging def test_things(caplog): # things assert list(filter(lambda r: r[0] ==...

I've ran into strange issue with pytest-catchlog. I have a fairly large test suite, and one of the tests has to run without any loggers in order to test functionality....

If I pass logger name to caplog.set_level like this ``` caplog.set_level(logging.ERROR, logger='package.utils') ``` then for all following test cases that logger will have level set to ERROR, which is not...

Set default for `log_file_format` and `log_file_date_format` to `None`. This means that if you set `log_format` and not `log_file_format`, the file format changes to as expected.