def generate_command(
         self, document: Document) -> Optional[GeneratedSnippetResult]:
     """Generates a boilerplate Cheetah code snippet based on the current inputs and outputs
     of this tool wrapper."""
     tool = GalaxyToolXmlDocument(document)
     generator = GalaxyToolCommandSnippetGenerator(tool)
     return generator.generate_snippet()
Exemplo n.º 2
0
    def test_generate_snippet_with_command_with_cdata_returns_snippet_only(self) -> None:
        document = TestUtils.to_document("<tool><command><![CDATA[]]></command></tool>")
        tool = GalaxyToolXmlDocument(document)
        generator = GalaxyToolCommandSnippetGenerator(tool)

        result = generator.generate_snippet()

        assert "<command" not in result.snippet
        assert "<![CDATA[" not in result.snippet