test_options.py 文件源码

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

项目:flake8-polyfill 作者: PyCQA 项目源码 文件源码
def test_normalize_paths_callback(values, parsed_value, expected_value):
    """Assert our normalize_paths_callback behaves the right way."""
    dest = 'exclude'
    opt_str = '--exclude'
    option = optparse.Option(opt_str, dest=dest)
    parser = mock.Mock(values=optparse.Values(values))
    options.normalize_paths_callback(option, opt_str, parsed_value, parser)
    assert getattr(parser.values, dest) == expected_value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号