def test_short_list(): arguments = af.get_args(["build", "-l"]) with pytest.raises(SystemExit): pd.proc_collector(process_map, arguments)
def test_list_long(): sys.argv.append(1) args = af.get_args(["build", "-L"]) with pytest.raises(SystemExit): af.build(args)
def test_check_invalid(): sys.argv.append(1) args = af.get_args(["build", "-t", "'A B C()'", "-c", "-o teste.nf"]) with pytest.raises(SystemExit): af.build(args)
def test_check_invalid(): args = af.get_args(["-t 'A B C()'", "-c", "-o teste.nf"]) sys.argv.append(1) with pytest.raises(SystemExit): af.run(args)
def test_build_file(tmp): p = os.path.join(os.path.abspath(tmp), "teste.nf") sys.argv.append(1) args = af.get_args(["build", "-t", "integrity_coverage fastqc", "-o", "{}".format(p)]) af.build(args)
def test_build_file_2(tmp): p = os.path.join(os.path.abspath(tmp), "teste.nf") sys.argv.append(1) args = af.get_args(["-t integrity_coverage fastqc", "-o", "{}".format(p), "--include-templates"]) af.run(args)
def test_build_file(tmp): p = os.path.join(os.path.abspath(tmp), "teste.nf") sys.argv.append(1) args = af.get_args(["-t integrity_coverage fastqc", "-o", "{}".format(p)]) af.run(args) assert sorted(os.listdir(tmp)) == ["containers.config", "resources.config", "teste.html", "teste.nf"]
def test_build_file_2(tmp): sys.argv.append(1) p = os.path.join(os.path.abspath(tmp), "teste.nf") args = af.get_args(["build", "-t integrity_coverage fastqc", "-o", "{}".format(p), "--pipeline-only"]) af.build(args) assert sorted(os.listdir(tmp)) == ["containers.config", "lib", "params.config", "resources.config", "teste.html", "teste.nf", "user.config"]
def test_list_long(): args = af.get_args(["-L"]) with pytest.raises(SystemExit): af.run(args)
def test_list_short(): args = af.get_args(["-l"]) with pytest.raises(SystemExit): af.run(args)