File: README.md

package info (click to toggle)
pytest-logdog 0.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 116 kB
  • sloc: python: 329; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 482 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# pytest-logdog: Pytest plugin to test logging

## Usage

```python
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

* [Rationale and design](https://github.com/ods/pytest-logdog/blob/master/DESIGN.md)
* [Change log](https://github.com/ods/pytest-logdog/blob/master/CHANGELOG.md)