test_main.py 文件源码

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

项目:artman 作者: googleapis 项目源码 文件源码
def test_with_config(self, is_file, open_):
        # Create our stand-in config file.
        config_file = textwrap.dedent(u"""\
        ---
        local_paths:
          reporoot: ~/Code
        publish: local
        """)
        is_file.return_value = True
        open_.return_value = io.StringIO(config_file)

        # Get the config and test the result.
        flags = Namespace(user_config='/bogus/file.yaml', command='not_init')
        user_config = main.read_user_config(flags)
        assert user_config == {
            'local_paths': {'reporoot': '~/Code'},
            'publish': 'local',
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号