Fix logging doc: change x.level to x.levelno

This commit is contained in:
James Cooke 2019-09-20 18:36:25 +01:00
parent c8cf748c49
commit 2fcf21a6c7
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ the records for the ``setup`` and ``call`` stages during teardown like so:
yield window
for when in ("setup", "call"):
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:
pytest.fail(