Example #1
0
def test_nosuch_template(proc, reportfile, tmp_path):
    ppl = PyPPL(forks=5).start(proc).run()
    tmpdir = tmp_path.joinpath('nosuchstatic')
    tmpdir.mkdir(exist_ok=True)
    tmpdir.joinpath('template.html').write_text('')
    with pytest.raises(ValueError):
        ppl.report(outfile=reportfile,
                   standalone=False,
                   template=str(tmpdir.joinpath('template.html')))
Example #2
0
def test_pandoc_cmderror(proc, tmp_path):
    ppl = PyPPL(forks=5).start(proc).run()
    with pytest.raises(SystemExit):
        ppl.report(outfile=tmp_path, template='nonexist')
    assert tmp_path.joinpath('%s.report.tmp.md' % ppl.name).is_file()