Author Kit Yan Choi
Recipients Kit Yan Choi
Date 2020-01-18.20:25:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579379123.37.0.908861475494.issue39385@roundup.psfhosted.org>
In-reply-to
Content
assertLogs is really useful (issue18937). Unfortunately it does not cover the use cases where one wants to ensure no logs are emitted.

Similar to assertLogs, we can have a context manager for asserting no logs, something like this?:

with assertNoLogs(logger, level):
    ...


If logs are unexpected found, the test would fail with the logs captured included in the error message.

Happy to submit a PR if there is interest.
History
Date User Action Args
2020-01-18 20:25:23Kit Yan Choisetrecipients: + Kit Yan Choi
2020-01-18 20:25:23Kit Yan Choisetmessageid: <1579379123.37.0.908861475494.issue39385@roundup.psfhosted.org>
2020-01-18 20:25:23Kit Yan Choilinkissue39385 messages
2020-01-18 20:25:22Kit Yan Choicreate