Loading test/unit/tool_util/test_loader_directory.py +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 Loading @@ -21,6 +20,5 @@ steps: in: input1: input1""" ) tf.flush() assert is_a_yaml_with_class(fname, ["GalaxyWorkflow"]) os.unlink(fname) Loading
test/unit/tool_util/test_loader_directory.py +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 Loading @@ -21,6 +20,5 @@ steps: in: input1: input1""" ) tf.flush() assert is_a_yaml_with_class(fname, ["GalaxyWorkflow"]) os.unlink(fname)