Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Fix test failing because of loguru upgrade #325

Merged
merged 1 commit into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions axion/handler/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def analyze(

if signature:
logger.opt(record=True).error(
'Unconsumed arguments [{args}] detected in {op_id} handler signature',
'Unconsumed arguments [{f_args}] detected in {op_id} handler signature',
op_id=operation.id,
args=', '.join(arg_key for arg_key in signature.keys()),
f_args=', '.join(arg_key for arg_key in signature.keys()),
)
errors.update(
exceptions.Error(
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ def emit(self, record: logging.LogRecord) -> None:
logging.getLogger(record.name).handle(record)

logger.enable('axion')

logger.add(
handler_id = logger.add(
LoguruHandler(),
format='{message}',
)
yield caplog

logger.remove(handler_id)
logger.disable('axion')