Fix logging doc: change x.level to x.levelno (#5866)

Fix logging doc: change x.level to x.levelno
This commit is contained in:
Bruno Oliveira 2019-09-21 11:28:40 -03:00 committed by GitHub
commit 1b4ad7774b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 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(