def test_main_no_update(tmpdir, example): _main( [example], should_update=False, rootdir=tmpdir, ) # check for the created tmpdir assert tmpdir.join('doc-exec-0').check(dir=1)
def test_parsing_problem(tmpdir): simple_fp = tmpdir.join('index.txt') simple_fp.write(example_index) _main( [simple_fp], should_update=True, rootdir=tmpdir, ) corrected = simple_fp.read() assert corrected == example_index
def test_empty_update(tmpdir): simple_fp = tmpdir.join('simple.txt') simple_fp.write("") _main( [simple_fp], should_update=True, rootdir=tmpdir, ) corrected = simple_fp.read() assert corrected == ""