Skip to content

Commit 2fcf21a

Browse files
committed
Fix logging doc: change x.level to x.levelno
1 parent c8cf748 commit 2fcf21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/en/logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ the records for the ``setup`` and ``call`` stages during teardown like so:
161161
yield window
162162
for when in ("setup", "call"):
163163
messages = [
164-
x.message for x in caplog.get_records(when) if x.level == logging.WARNING
164+
x.message for x in caplog.get_records(when) if x.levelno == logging.WARNING
165165
]
166166
if messages:
167167
pytest.fail(

0 commit comments

Comments
 (0)