How can I see log messages when unit testing in PyCharm?

The only solution I’ve found is to do the normal logging setup at the top of the file with tests in it (assuming you’re just running one test or test class): logging.basicConfig(level=logging.DEBUG). Make sure you put that before most import statements or the default logging for those modules will have already been set (that was a hard one to figure out!).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)