wimglenn / pytest-structlog

Structured logging assertions
MIT License
56 stars 6 forks source link

Reset logging config on teardown #6

Closed karlb closed 5 years ago

karlb commented 5 years ago

The log fixture should not have any side effects on other tests. Now it only changes the log handling during the test instead of keeping the change for all following tests.

wimglenn commented 5 years ago

Hi @karlb, your change looks fine, but I'm curious what is the use-case? Do you log some events during teardown?

This has been released in v0.2 https://github.com/wimglenn/pytest-structlog/releases/tag/v0.2

karlb commented 5 years ago

After the log fixture has been used, the capsys fixture did not behave as expected. So introducing pytest-structlog and using it only for some tests was breaking other tests.