Skip to content

ods/pytest-logdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Log capturing for pytest with usable interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages