Skip to content

Commit

Permalink
TST: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Apr 16, 2024
1 parent aab7f24 commit 32635ba
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from click.testing import CliRunner

from gbintk.cli import graphbin
from gbintk.cli import graphbin, graphbin2, metacoag


__author__ = "Vijini Mallawaarachchi"
__credits__ = ["Vijini Mallawaarachchi"]
Expand Down Expand Up @@ -36,4 +37,25 @@ def test_graphbin_run(runner, tmp_dir):
binned = DATADIR / "ESC_metaSPAdes" / "initial_binning_res.csv"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --binned {binned} --output {outpath}".split()
r = runner.invoke(graphbin, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

def test_graphbin2_run(runner, tmp_dir):
outpath = tmp_dir
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "Sim-5G+metaSPAdes" / "contigs.fasta"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
binned = DATADIR / "Sim-5G+metaSPAdes" / "initial_contig_bins.csv"
abundance = DATADIR / "Sim-5G+metaSPAdes" / "abundance.abund"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --binned {binned} --abundance {abundance} --output {outpath}".split()
r = runner.invoke(graphbin2, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

def test_metacoag_run(runner, tmp_dir):
outpath = tmp_dir
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "Sim-5G+metaSPAdes" / "contigs.fasta"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
abundance = DATADIR / "Sim-5G+metaSPAdes" / "coverm_mean_coverage.tsv"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --abundance {abundance} --output {outpath}".split()
r = runner.invoke(metacoag, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

0 comments on commit 32635ba

Please sign in to comment.