def test_double_pygment_in_html_html(self): # FIXME: the output is still markup. we need a second pass test_file = self.get_test_loc(u'markup/double_pygment_in_html.html') expected = self.get_test_loc( u'markup_expected/double_pygment_in_html.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def atest_gen(self): """ Rename to test xxx to regen tests. """ test_dir = self.get_test_loc(u'markup', True) expected_dir = self.get_test_loc(u'markup_expected') template = u""" def test_%(tn)s(self): test_file = self.get_test_loc(u'markup/%(test_file)s') expected = self.get_test_loc(u'markup_expected/%(test_file)s') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)""" for test_file in os.listdir(test_dir): tn = text.python_safe_name(test_file) location = os.path.join(test_dir, test_file) result = markup.convert_to_text(location) expected_file = os.path.join(expected_dir, test_file) fileutils.copyfile(result, expected_file) print(template % locals())
def test_double_pygment_in_html_html(self): # FIXME: the output is still markup. we need a second pass test_file = self.get_test_loc(u'markup/double_pygment_in_html.html') expected = self.get_test_loc(u'markup_expected/double_pygment_in_html.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def test_contenttype_html(self): test_file = self.get_test_loc(u'markup/contenttype.html') expected = self.get_test_loc(u'markup_expected/contenttype.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def test_allclasses_frame_html(self): test_file = self.get_test_loc(u'markup/allclasses-frame.html') expected = self.get_test_loc(u'markup_expected/allclasses-frame.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def test_a_htm(self): test_file = self.get_test_loc(u'markup/a.htm') expected = self.get_test_loc(u'markup_expected/a.htm') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def test_rst_highlighted_html(self): test_file = self.get_test_loc(u'markup/rst_highlighted.html') expected = self.get_test_loc(u'markup_expected/rst_highlighted.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)
def test_json_phps_html(self): test_file = self.get_test_loc(u'markup/JSON.phps.html') expected = self.get_test_loc(u'markup_expected/JSON.phps.html') result = markup.convert_to_text(test_file) file_cmp(expected, result, ignore_line_endings=True)