logrus.pytest_plugin module

A pytest plugin for testing the logrus package.

This plugin can be enabled via the pytest_plugins conftest.py variable. This allows us to use this plugin in external packages’ tests instead of just for this package’s tests.

Examples

The following line should be found in the “tests/conftest.py” file:

>>> pytest_plugins = ["logrus.pytest_plugin"]
mock_dynamic_log_fields(mocker)[source]

Mock dynamic fields that may be contained in log records.

Parameters

mocker (MockerFixture) –

Return type

None