python类log_capture()的实例源码

scraper_test.py 文件源码 项目:scraper 作者: m-lab 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def setUp(self):
        # If you depend on log messages, use testfixtures.log_capture() to test
        # for their presence and assert their contents.  For the purposes of
        # the test runner, log messages on stdout/stderr are spam.
        logging.getLogger().setLevel(logging.WARNING)
scraper_test.py 文件源码 项目:scraper 作者: m-lab 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def setUp(self):
        # If you depend on log messages, use testfixtures.log_capture() to test
        # for their presence and assert their contents.  For the purposes of
        # the test runner, log messages on stdout/stderr are spam.
        logging.getLogger().setLevel(logging.WARNING)
        self._old_cwd = os.getcwd()
        self.temp_d = tempfile.mkdtemp()
        os.chdir(self.temp_d)


问题


面经


文章

微信
公众号

扫码关注公众号