Exemplo n.º 1
0
def test_walk_working_dir():
    with wrap() as wrapper:
        doc = Doc("example.sh|sh",
                contents = "echo 'hello' > newfile.txt",
                sh = {
                    "walk-working-dir" : True,
                    },
                wrapper=wrapper)

        wrapper.docs = [doc]
        wrapper.run()

        for doc in wrapper.registered:
            if doc.key_with_class() == "Doc:example.sh-sh.txt-files":
                assert doc.output().as_sectioned()['newfile.txt'] == "hello\n"