test_package.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:homeassistant 作者: NAStools 项目源码 文件源码
def test_install_error(self, mock_sys, mock_logger, mock_exists,
                           mock_subprocess):
        """Test an install with a target."""
        mock_exists.return_value = False
        mock_subprocess.side_effect = [subprocess.SubprocessError]

        self.assertFalse(package.install_package(TEST_NEW_REQ))

        self.assertEqual(mock_logger.exception.call_count, 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号