def test_plot_multiple(tmpdir, basictrees, with_ete3): plot = Plot(dummy=not with_ete3, output=str(tmpdir.join('test')), height=600, width=800, multiple=True) list(plot.consume(basictrees))
def test_plot_annotated(tmpdir, basictrees, with_ete3): annotated_trees = build_pipeline( "annotate --f tests/argfiles/annotation.csv -k taxon", source=basictrees) plot = Plot(output=str(tmpdir.join('test')), attribute="f1", dummy=not with_ete3) list(plot.consume(annotated_trees))
def test_plot(dummy=False): lines = fileinput.input("tests/treefiles/basic.trees") trees = NewickParser().consume(lines) with tempfile.NamedTemporaryFile() as fp: plot = Plot(dummy=dummy, output=fp.name, height=600, width=800) for x in plot.consume(trees): pass lines.close()
def test_plot_annotated(dummy=False): lines = fileinput.input("tests/treefiles/basic.trees") trees = NewickParser().consume(lines) annotated_trees = build_pipeline( "annotate --f tests/argfiles/annotation.csv -k taxon", source=trees) with tempfile.NamedTemporaryFile() as fp: plot = Plot(output=fp.name, attribute="f1", dummy=dummy) for x in plot.consume(annotated_trees): pass lines.close()
def test_init_from_args(with_ete3): if not with_ete3: assert True else: Plot.init_from_args("")
def test_init_from_args(dummy=False): if dummy: assert True else: plot = Plot.init_from_args("")