def build(self, lib): libdoc = LibraryDoc(name=lib.name, doc=self._get_doc(lib), doc_format=lib.doc_format) libdoc.inits = self._get_initializers(lib) libdoc.keywords = KeywordDocBuilder().build_keywords(lib) return libdoc
def verify_keyword_shortdoc(doc_format, doc_input, expected): libdoc = LibraryDoc(doc_format=doc_format) libdoc.keywords = [KeywordDoc(doc=doc_input)] formatter = DocToHtml(doc_format) keyword = libdoc.keywords[0] keyword.doc = formatter(keyword.doc) libdoc.doc_format = 'HTML' assert_equal(keyword.shortdoc, expected)
def build(self, library): name, args = self._split_library_name_and_args(library) lib = TestLibrary(name, args, variables=self.variables) libdoc = LibraryDoc(name=lib.name, doc=self._get_doc(lib), version=lib.version, scope=str(lib.scope), doc_format=lib.doc_format, source=lib.source, lineno=lib.lineno) libdoc.inits = self._get_initializers(lib) libdoc.keywords = KeywordDocBuilder().build_keywords(lib) return libdoc
def verify_keyword_shortdoc(doc_format, doc_input, expected): libdoc = LibraryDoc(doc_format=doc_format) libdoc.keywords = [KeywordDoc(doc=doc_input)] assert_equal(libdoc.keywords[0].shortdoc, expected)