Fix logging doc: change x.level to x.levelno (#5866)
Fix logging doc: change x.level to x.levelno
This commit is contained in:
commit
1b4ad7774b
|
@ -161,7 +161,7 @@ the records for the ``setup`` and ``call`` stages during teardown like so:
|
||||||
yield window
|
yield window
|
||||||
for when in ("setup", "call"):
|
for when in ("setup", "call"):
|
||||||
messages = [
|
messages = [
|
||||||
x.message for x in caplog.get_records(when) if x.level == logging.WARNING
|
x.message for x in caplog.get_records(when) if x.levelno == logging.WARNING
|
||||||
]
|
]
|
||||||
if messages:
|
if messages:
|
||||||
pytest.fail(
|
pytest.fail(
|
||||||
|
|
Loading…
Reference in New Issue