test_cli.py 文件源码

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

项目:Easysentiment 作者: Jflick58 项目源码 文件源码
def test_cli(argv):
    """test function."""
    with mock.patch('easysentiment.cli.scrape') as m_scrape, \
            mock.patch('easysentiment.cli.scrape_and_analyze') as m_saa, \
            mock.patch('easysentiment.cli.analyze_sentiment') as m_as:
        mock_dict = {
            'scrape': m_scrape,
            'scrape-and-analyze': m_saa,
            'analyze-sentiment': m_as,
        }
        from easysentiment.cli import cli
        cli([argv])
        mock_dict[argv].assert_called_once_with()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号