def _assert_has_line_matching_(self, ref, label, path, expression): output = self._output_lookup[ref] contents = output.find('assert_contents') if contents is None: contents = XMLNode('assert_contents') output.append(contents) path = f'.*/data/{path}' archive = contents.find(f'has_archive_member[@path="{path}"]') if archive is None: archive = XMLNode('has_archive_member', path=path) contents.append(archive) archive.append(XMLNode('has_line_matching', expression=expression))
def _galaxy_has_line_matching(self, path, expression): output = self.use.output_lookup[self.name] contents = output.find('assert_contents') if contents is None: contents = XMLNode('assert_contents') output.append(contents) path = (r'[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]' r'{3}-[0-9a-f]{12}\/') + path archive = contents.find(f'has_archive_member[@path="{path}"]') if archive is None: archive = XMLNode('has_archive_member', path=path) contents.append(archive) archive.append(XMLNode('has_line_matching', expression=expression))