Skip to main content

Сaptures loguru logging output

Project description

loguru-caplog

Сaptures loguru logging output.

Source: Making things work with Pytest and caplog

Usage

from loguru_caplog import loguru_caplog as caplog

# `some_func` adds two numbers, and logs a warning if the first is < 1
def test_some_func_logs_warning(caplog):
    assert some_func(-1, 3) == 2
    assert "Oh no!" in caplog.text

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loguru-caplog-0.2.0.tar.gz (2.5 kB view hashes)

Uploaded source

Built Distribution

loguru_caplog-0.2.0-py3-none-any.whl (3.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page