def test_html_path(self): expected_results = { 'index.md': 'index.html', 'api-guide.md': 'api-guide/index.html', 'api-guide/index.md': 'api-guide/index.html', 'api-guide/testing.md': 'api-guide/testing/index.html', } for file_path, expected_html_path in expected_results.items(): html_path = utils.get_html_path(file_path) self.assertEqual(html_path, expected_html_path)
def __init__(self, title, url, path, url_context): self.title = title self.abs_url = url self.active = False self.url_context = url_context # Relative paths to the input markdown file and output html file. self.input_path = path self.output_path = utils.get_html_path(path) # Links to related pages self.previous_page = None self.next_page = None self.ancestors = []