Skip to content
Snippets Groups Projects
Commit 9e67ecf8 authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Func test tree module when not verbose

parent 6d9d6899
No related branches found
No related tags found
No related merge requests found
Pipeline #40109 passed
......@@ -121,6 +121,43 @@ def test_main_quicktree(capsys):
assert "END" in out
def test_main_quicktree_notverbose(capsys):
"""
Test that when giving the alignment file, running with quicktree, no bootstraps,
it creates expected files
"""
outdir = GENEPATH
soft = "quicktree"
model = None
threads = 1
cmd = "cmd: test_main_quicktree"
tree.main(cmd, ALIGNMENT, outdir, soft, model, threads)
# Check output files
# stockholm alignments
stockholm = os.path.join(outdir, "exp_pers4genomes.grp.aln.stockholm")
assert os.path.isfile(stockholm)
# quicktree logfile
log_file = stockholm + ".quicktree.log"
assert os.path.isfile(log_file)
with open(log_file, "r") as logf:
assert logf.readlines() == []
# tree file
tree_file = stockholm + ".quicktree_tree.nwk"
assert os.path.isfile(tree_file)
assert tutils.is_tree_lengths(tree_file)
assert not tutils.is_tree_bootstrap(tree_file)
# log files
logs_base = os.path.join(outdir, "PanACoTA-tree-quicktree.log")
assert os.path.isfile(logs_base)
assert os.path.isfile(logs_base + ".details")
assert os.path.isfile(logs_base + ".err")
# Check logs
out, err = capsys.readouterr()
assert "Converting fasta alignment to stockholm format." in out
assert "Running Quicktree..." in out
assert "END" in out
def test_main_fastme(capsys):
"""
Test that when giving the alignment file, running with fastme, no bootstraps,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment