test_deps.py 文件源码

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

项目:scarlett_os 作者: bossjones 项目源码 文件源码
def test_pkg_info_for_wrong_dist_version(self, deps_mocker_stopall):
        # mock
        mock_get_distribution = deps_mocker_stopall.MagicMock(name="mock_get_distribution")
        # patch
        deps_mocker_stopall.patch.object(pkg_resources, 'get_distribution', mock_get_distribution)
        mock_get_distribution.side_effect = pkg_resources.VersionConflict

        result = deps.pkg_info()

        assert PROJECT_NAME == result['name']
        assert 'version' not in result
        assert 'path' not in result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号