From 810c824a20b0fc98e291a81914be984dee8770fe Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 27 Apr 2005 21:04:03 +0000 Subject: fixed encoding/charset values in "html_prolog" & "html_head" parts, which should not have been interpolated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3268 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/test/DocutilsTestSupport.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'docutils/test/DocutilsTestSupport.py') diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py index 87a200598..d9f78f774 100644 --- a/docutils/test/DocutilsTestSupport.py +++ b/docutils/test/DocutilsTestSupport.py @@ -731,11 +731,16 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase): expected = self.expected % {'version': docutils.__version__} self.compare_output(self.input, output, expected) - standard_meta_value_template = """\ - - -""" - standard_meta_value = standard_meta_value_template % docutils.__version__ + + standard_content_type_template = ('\n') + standard_generator_template = ( + '\n') + standard_html_meta_value = ( + standard_content_type_template + + standard_generator_template % docutils.__version__) + standard_meta_value = standard_html_meta_value % 'utf-8' standard_stylesheet_value = ('\n') standard_html_prolog = """\ @@ -745,16 +750,16 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase): def format_output(self, parts): """Minimize & standardize the output.""" - # remove redundant bits: + # remove redundant parts: del parts['whole'] assert parts['body'] == parts['fragment'] del parts['body'] - # remove standard bits: + # remove standard portions: parts['meta'] = parts['meta'].replace(self.standard_meta_value, '') if parts['stylesheet'] == self.standard_stylesheet_value: del parts['stylesheet'] parts['html_head'] = parts['html_head'].replace( - self.standard_meta_value, '...') + self.standard_html_meta_value, '...') parts['html_prolog'] = parts['html_prolog'].replace( self.standard_html_prolog, '') # remove empty values: -- cgit v1.2.1