test_regendoc.py 文件源码

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

项目:devpi 作者: devpi 项目源码 文件源码
def test_docfile_chdir(tmpdir):

    tmpdir.ensure('nested/file').write('some text\n')
    example = tmpdir.join('example.txt')
    example.write('some shell test\n'
                  '  nested $ cat file\n'
                  '  some other text\n')

    action, = list(actions_of(example))
    excpected_action = {
        'action': 'shell',
        'file': example,
        'content': 'some other text\n',
        'cwd': 'nested',
        'indent': 2,
        'line': 1,
        'target': 'cat file',
    }
    assert action == excpected_action

    needed_updates = check_file(example, tmpdir)
    py.std.pprint.pprint(needed_updates)
    assert needed_updates
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号