def test_sphinx(test_name, app, verify): app.build() output_dir = OUTPUT_PATH / test_name if output_dir.exists(): shutil.rmtree(output_dir) shutil.copytree(app.outdir, output_dir) verify_output(test_name, output_dir, ROOTS_PATH)
def test_rinoh(script_runner, test_name): rst_path = Path(test_name + '.rst') args = [] templconf_path = rst_path.with_suffix('.rtt') if (RINOH_PATH / templconf_path).exists(): args += ['--template', str(templconf_path)] stylesheet_path = rst_path.with_suffix('.rts') if (RINOH_PATH / stylesheet_path).exists(): args += ['--stylesheet', str(stylesheet_path)] output_dir = OUTPUT_PATH / ('rinoh_' + test_name) output_dir.mkdir(parents=True, exist_ok=True) ret = script_runner.run('rinoh', *args, str(rst_path), '--output', str(output_dir), cwd=RINOH_PATH) assert ret.success verify_output(test_name, output_dir, RINOH_PATH)
def test_sphinx(test_name, app, verify): app.build() output_dir = OUTPUT_PATH / test_name if output_dir.exists(): shutil.rmtree(output_dir) shutil.copytree(app.outdir, output_dir) if test_name == 'twotargets': verify_output('manual', output_dir, ROOTS_PATH) verify_output('reference', output_dir, ROOTS_PATH) else: verify_output(test_name, output_dir, ROOTS_PATH)
def _verify(): testroot = app.srcdir.basename() verify_output(testroot, app.outdir, rootdir)