Pytest-structlog

Latest version: v0.8

Safety actively analyzes 623360 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.8

What's Changed
* Transform method_name "exception" into level "error" by b0g3r in https://github.com/wimglenn/pytest-structlog/pull/31

New Contributors
* b0g3r made their first contribution in https://github.com/wimglenn/pytest-structlog/pull/31

**Full Changelog**: https://github.com/wimglenn/pytest-structlog/compare/v0.7...v0.8

0.7

What's Changed
* Clear contextvars between tests by logi in https://github.com/wimglenn/pytest-structlog/pull/25
* Add factory method for log events to assert on for better readability by logi in https://github.com/wimglenn/pytest-structlog/pull/23
* Add typing annotations by palfrey in https://github.com/wimglenn/pytest-structlog/pull/27
* Python 3.7+ is required.

New Contributors
* logi made their first contribution in https://github.com/wimglenn/pytest-structlog/pull/25
* palfrey made their first contribution in https://github.com/wimglenn/pytest-structlog/pull/27

**Full Changelog**: https://github.com/wimglenn/pytest-structlog/compare/v0.6...v0.7

0.6

What's Changed
* preserve contextvars if necessary - closes 20 by wimglenn in https://github.com/wimglenn/pytest-structlog/pull/21


**Full Changelog**: https://github.com/wimglenn/pytest-structlog/compare/v0.5...v0.6

0.5

- Better default behavior when we can detect that the code under test was using a [`PositionalArgumentsFormatter`](https://www.structlog.org/en/stable/api.html#structlog.stdlib.PositionalArgumentsFormatter).

0.4

- Adds a "captured structlog call" section in the test report in case of failed tests
- Reverts use of `structlog.reset_defaults()` in fixture setup. This caused issues in certain non-default configurations. Users should mock out their own structlog configure call in their test suite if necessary, with a pytest auto-use fixture.

0.3

- log capture will reset defaults in case user code has already configured structlog at library import time. closes https://github.com/wimglenn/pytest-structlog/issues/10

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.