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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pytest-logdog-0.1.0.tar.gz.

File metadata

  • Download URL: pytest-logdog-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for pytest-logdog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b84aca02b6b609bda8bfcd6d0207a428b146cd706d14c7095a3ba79429ab534b
MD5 d384dfb035edab4148ded8a61ddbcc73
BLAKE2b-256 117a4c59b0bce4d9a56a570d89038ae771b8dcb38ec691f871fd946141d29bca

See more details on using hashes here.

File details

Details for the file pytest_logdog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_logdog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for pytest_logdog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5a4c46442ca7da73b1cf6c9ebea144958a0a6258ba19ad7bf877dec22400e8
MD5 a91e6e60bb445aafa325842c4ac74c0b
BLAKE2b-256 1986f3716547f113acc07167baeff445c2c5445cdbdb0411295fc24dd0a4b53e

See more details on using hashes here.

Supported by

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