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)
评论列表
文章目录