Skip to main content

Pytest plugin to test logging

Project description

pytest-logdog: Pytest plugin to test logging

Usage

pytest_plugins = ["pytest_logdog"]

def test_it_works(logdog):
    with logdog() as pile:
        logging.info("Hello world!")
    [rec] = pile.drain(message="Hello.*")
    assert rec.levelno == logging.INFO
    assert pile.is_empty()

Links

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

pytest-logdog-0.1.0.tar.gz (7.2 kB view hashes)

Uploaded source

Built Distribution

pytest_logdog-0.1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page