Skip to content

Commit

Permalink
Fix loguru test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino authored and hmstepanek committed Feb 22, 2024
1 parent 2755208 commit 5bbf0dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/logger_loguru/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def _patcher(d):
bound_logger.error("context_attrs: {}", "arg1", kwarg_attr=4)


@validate_log_events([{"message": "exc_info"}], required_attrs=["context.file"])
@validate_log_events([{"message": "exc_info"}], required_attrs=["context.exception"])
@validate_log_event_count(1)
@background_task()
def test_loguru_exception_context_attributes(logger):
try:
raise RuntimeError("Oops")
except Exception:
logger.error("exc_info")
logger.opt(exception=True).error("exc_info")


@validate_log_events([{"context.extra.attr": 1}])
Expand Down

0 comments on commit 5bbf0dc

Please sign in to comment.