Skip to content

Commit 5bbf0dc

Browse files
TimPansinohmstepanek
authored andcommitted
Fix loguru test
1 parent 2755208 commit 5bbf0dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/logger_loguru/test_attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ def _patcher(d):
5353
bound_logger.error("context_attrs: {}", "arg1", kwarg_attr=4)
5454

5555

56-
@validate_log_events([{"message": "exc_info"}], required_attrs=["context.file"])
56+
@validate_log_events([{"message": "exc_info"}], required_attrs=["context.exception"])
5757
@validate_log_event_count(1)
5858
@background_task()
5959
def test_loguru_exception_context_attributes(logger):
6060
try:
6161
raise RuntimeError("Oops")
6262
except Exception:
63-
logger.error("exc_info")
63+
logger.opt(exception=True).error("exc_info")
6464

6565

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

0 commit comments

Comments
 (0)