PyDev unittesting: How to capture text logged to a logging.Logger in “Captured Output”

后端 未结 7 2152
青春惊慌失措
青春惊慌失措 2020-12-07 20:08

I am using PyDev for development and unit-testing of my Python application. As for unit-testing, everything works great except the fact that no content is logged to the logg

7条回答
  •  再見小時候
    2020-12-07 20:51

    I'd suggest using a LogCapture and testing that you really are logging what you expect to be logging:

    http://testfixtures.readthedocs.org/en/latest/logging.html

提交回复
热议问题