def test_subdirs(self): state = State(copy.deepcopy(default_config)) with self.assertLogs() as cm: with self.assertRaises(NotImplementedError): parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile-subdirs') self.assertEqual(cm.output, [ "CRITICAL:root:test_doxygen/doxyfile/Doxyfile-subdirs: CREATE_SUBDIRS is not supported, sorry. Disable it and try again." ])
def run_doxygen(self, templates=default_templates, wildcard=default_wildcard, index_pages=default_index_pages, config={}): state = State({**copy.deepcopy(default_config), **config}) parse_doxyfile(state, os.path.join(self.path, 'Doxyfile')) run(state, templates=templates, wildcard=wildcard, index_pages=index_pages, sort_globbed_files=True)
def test(self): state = State() parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile') self.assertEqual( state.doxyfile, { 'DOT_FONTNAME': 'Helvetica', 'DOT_FONTSIZE': 10, 'HTML_EXTRA_FILES': ['css', 'another.png', 'hello'], 'HTML_EXTRA_STYLESHEET': ['a.css', 'b.css'], 'HTML_OUTPUT': 'html', 'M_CLASS_TREE_EXPAND_LEVELS': 1, 'M_EXPAND_INNER_TYPES': False, 'M_FAVICON': 'favicon-dark.png', 'M_FILE_TREE_EXPAND_LEVELS': 1, 'M_LINKS_NAVBAR1': ['pages', 'modules'], 'M_LINKS_NAVBAR2': ['files', 'annotated'], # different order 'M_MATH_CACHE_FILE': 'm.math.cache', 'M_PAGE_FINE_PRINT': 'this is "quotes"', 'M_PAGE_HEADER': 'this is "quotes" \'apostrophes\'', 'M_SEARCH_DISABLED': False, 'M_SEARCH_DOWNLOAD_BINARY': False, 'M_SEARCH_BASE_URL': '', 'M_SEARCH_EXTERNAL_URL': '', 'M_SEARCH_HELP': """<p class="m-noindent">Search for symbols, directories, files, pages or modules. You can omit any prefix from the symbol or file path; adding a <code>:</code> or <code>/</code> suffix lists all members of given symbol or directory.</p> <p class="m-noindent">Use <span class="m-label m-dim">↓</span> / <span class="m-label m-dim">↑</span> to navigate through the list, <span class="m-label m-dim">Enter</span> to go. <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can copy a link to the result using <span class="m-label m-dim">⌘</span> <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span> <span class="m-label m-dim">M</span> produces a Markdown link.</p> """, 'M_SHOW_UNDOCUMENTED': False, 'M_THEME_COLOR': '#22272e', 'M_VERSION_LABELS': False, 'OUTPUT_DIRECTORY': '', 'PROJECT_BRIEF': 'is cool', 'PROJECT_LOGO': '', 'PROJECT_NAME': 'My Pet Project', 'SHOW_INCLUDE_FILES': True, 'XML_OUTPUT': 'xml' })
def test(self): state = State() parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile') self.assertEqual(state.doxyfile, { 'DOT_FONTNAME': 'Helvetica', 'DOT_FONTSIZE': 10, 'HTML_EXTRA_FILES': ['css', 'another.png', 'hello'], 'HTML_EXTRA_STYLESHEET': ['a.css', 'b.css'], 'HTML_OUTPUT': 'html', 'M_CLASS_TREE_EXPAND_LEVELS': 1, 'M_EXPAND_INNER_TYPES': False, 'M_FAVICON': 'favicon-dark.png', 'M_FILE_TREE_EXPAND_LEVELS': 1, 'M_LINKS_NAVBAR1': ['pages', 'modules'], 'M_LINKS_NAVBAR2': ['files', 'annotated'], # different order 'M_MATH_CACHE_FILE': 'm.math.cache', 'M_PAGE_FINE_PRINT': 'this is "quotes"', 'M_PAGE_HEADER': 'this is "quotes" \'apostrophes\'', 'M_SEARCH_DISABLED': False, 'M_SEARCH_DOWNLOAD_BINARY': False, 'M_SEARCH_BASE_URL': '', 'M_SEARCH_EXTERNAL_URL': '', 'M_SEARCH_HELP': """<p class="m-noindent">Search for symbols, directories, files, pages or modules. You can omit any prefix from the symbol or file path; adding a <code>:</code> or <code>/</code> suffix lists all members of given symbol or directory.</p> <p class="m-noindent">Use <span class="m-label m-dim">↓</span> / <span class="m-label m-dim">↑</span> to navigate through the list, <span class="m-label m-dim">Enter</span> to go. <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can copy a link to the result using <span class="m-label m-dim">⌘</span> <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span> <span class="m-label m-dim">M</span> produces a Markdown link.</p> """, 'M_SHOW_UNDOCUMENTED': False, 'M_THEME_COLOR': '#22272e', 'OUTPUT_DIRECTORY': '', 'PROJECT_BRIEF': 'is cool', 'PROJECT_NAME': 'My Pet Project', 'SHOW_INCLUDE_FILES': True, 'XML_OUTPUT': 'xml' })
def test(self): # Basically mirroring what's in the Doxyfile-legacy. It's silly because # we don't need to check most of these here anyway but whatever. To # make this a bit saner, all existing tests are using the # "legacy Doxyfile" config anyway, so it should be tested more than # enough... until we port away from that. This should get then further # extended to cover the cases that are no longer tested by other code. state = State({ **copy.deepcopy(default_config), **{ 'EXTRA_FILES': ['css', 'another.png', 'hello'], 'STYLESHEETS': ['a.css', 'b.css'], 'PAGE_HEADER': 'this is "quotes" \'apostrophes\'', 'FINE_PRINT': 'this is "quotes"', 'LINKS_NAVBAR1': [(None, 'pages', []), (None, 'modules', [])], 'LINKS_NAVBAR2': [(None, 'files', []), (None, 'annotated', [])] } }) parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile') self.assertEqual(state.doxyfile, self.expected_doxyfile) self.assertEqual(state.config, self.expected_config)
def test_subdirs(self): state = State() with self.assertRaises(NotImplementedError): parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile-subdirs')
def test_legacy(self): state = State(copy.deepcopy(default_config)) parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile-legacy') self.assertEqual(state.doxyfile, self.expected_doxyfile) self.assertEqual(state.config, self.expected_config)
def run_doxygen(self, templates=default_templates, wildcard=default_wildcard, index_pages=default_index_pages): state = State() parse_doxyfile(state, os.path.join(self.path, 'Doxyfile')) run(state, templates=templates, wildcard=wildcard, index_pages=index_pages, sort_globbed_files=True)
def test_subdirs(self): state = State(copy.deepcopy(default_config)) with self.assertRaises(NotImplementedError): parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile-subdirs')
def test_subdirs(self): state = State() with self.assertRaises(NotImplementedError): parse_doxyfile(state, 'test_doxygen/doxyfile/Doxyfile-subdirs')