Unverified Commit 8ec08f66 authored by M Bernt's avatar M Bernt Committed by GitHub
Browse files

Test improvements

parent 92d06c26
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
import os
import tempfile

from galaxy.tool_util.loader_directory import is_a_yaml_with_class


def test_is_a_yaml_with_class():
    with tempfile.NamedTemporaryFile("w", suffix=".yaml", delete=False) as tf:
    with tempfile.NamedTemporaryFile("w", suffix=".yaml") as tf:
        fname = tf.name
        tf.write(
            """class: GalaxyWorkflow
@@ -21,6 +20,5 @@ steps:
    in:
      input1: input1"""
        )

        tf.flush()
        assert is_a_yaml_with_class(fname, ["GalaxyWorkflow"])
    os.unlink(fname)