Skip to content

Commit 2ff70ad

Browse files
committed
test: adjust test for exc_info
1 parent 8f3dbc1 commit 2ff70ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_formatter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def test_format_exc_info():
6969
except Exception:
7070
exc_info = sys.exc_info()
7171

72-
value = Logfmter().format_exc_info(exc_info)
72+
record = logging.makeLogRecord({"msg": "Error", "exc_info": exc_info})
73+
value = Logfmter().format(record)
74+
_prefix, _, value = value.partition("exc_info=")
7375

7476
assert value.startswith('"') and value.endswith('"')
7577

0 commit comments

Comments
 (0)