def test_parampreset(infn, plugin_id, label, sha1sum): """Converting an ardour presets file with a single ChunkPresets produces correct output.""" infile = join(TESTDATA_DIR, infn) outdir = join(TESTOUTPUT_DIR, 'fxp') outfile = join(outdir, plugin_id, label.replace(' ', '_') + '.fxp') try: os.remove(outfile) except OSError: pass os.makedirs(outdir, exist_ok=True) ret = main(["-o", outdir, infile]) assert ret is None assert exists(outfile) assert sha1_digest(outfile) == sha1sum
def test_chunkpreset_single(infn, plugin_id, labels): """Converting an ardour presets file with multiple ChunkPresets produces correct output.""" infile = join(TESTDATA_DIR, infn) outdir = join(TESTOUTPUT_DIR, 'fxp') for label in labels: outfile = join(outdir, plugin_id, label.replace(' ', '_') + '.fxp') try: os.remove(outfile) except OSError: pass os.makedirs(outdir, exist_ok=True) ret = main(["-o", outdir, infile]) assert ret is None for label in labels: outfile = join(outdir, plugin_id, label.replace(' ', '_') + '.fxp') assert exists(outfile)
def test_parampreset_multi(infn, plugin_id, labels, sha1sums): """Converting an ardour presets file with multiple parameter Presets produces correct output.""" infile = join(TESTDATA_DIR, infn) outdir = join(TESTOUTPUT_DIR, 'fxp') for label in labels: outfile = join(outdir, plugin_id, label.replace(' ', '_') + '.fxp') try: os.remove(outfile) except OSError: pass os.makedirs(outdir, exist_ok=True) ret = main(["-o", outdir, infile]) assert ret is None for i, label in enumerate(labels): outfile = join(outdir, plugin_id, label.replace(' ', '_') + '.fxp') assert exists(outfile) assert sha1_digest(outfile) == sha1sums[i]