In my test I want to verify that no error log was done during the test. How do I do that?
I tried with self.assertLogs("", level="ERROR") as error_logs:
. This can capture the error logs, but it will also raise if there were no error logs at all.
In my test I want to verify that no error log was done during the test. How do I do that?
I tried with self.assertLogs("", level="ERROR") as error_logs:
. This can capture the error logs, but it will also raise if there were no error logs at all.
with self.assertNoLogs("", level="ERROR")
reference: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertNoLogs