Skip to content

Commit 1b4ad77

Browse files
authored
Fix logging doc: change x.level to x.levelno (#5866)
Fix logging doc: change x.level to x.levelno
2 parents 3114be9 + 2fcf21a commit 1b4ad77

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)