新人エンジニアのお仲間向けに、ロガー、パイテスト、モック化についての概要と実践編をシェアします。この記事では、それぞれの技術が何か、なぜ必要なのか、そして実際にどのように使うのかを詳しく説明します。 level: ログメッセージの重要度を ...
Use logger.info() for general information about the program's execution. Example: Indicating the start and end of significant operations. Use logger.warning() to indicate that something unexpected ...
Testing is set up using pytest and coverage is handled with the pytest-cov plugin. Run your tests with py.test in the root directory. Coverage is ran by default and is set in the pytest.ini file. To ...
I have worker thread(s) that use the logger. In the main thread, I occasionally need to ask the user to take some action. Which means I need to suppress the logger from actually printing until the ...