def test_get_element_content_range_of_element_returns_expected(self, source: str, element: str, expected: Range) -> None: document = TestUtils.to_document(source) tool = GalaxyToolXmlDocument(document) node = tool.find_element(element) actual = tool.get_element_content_range(node) assert actual == expected
def test_get_element_content_range_of_unknown_element_returns_none(self) -> None: document = TestUtils.to_document("<tool><tests></tests></tool>") tool = GalaxyToolXmlDocument(document) node = tool.find_element("unknown") actual = tool.get_element_content_range(node) assert actual is None