summaryrefslogtreecommitdiff
path: root/test/DocutilsTestSupport.py
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2006-03-31 03:36:28 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2006-03-31 03:36:28 +0000
commitdd7cd1657e9fa2e768fefa75da2f59416c7b56cf (patch)
treee2a3518124bbdea74cb8497bd13676b4be325df7 /test/DocutilsTestSupport.py
parentb1179b97eb9d2a1dacae968dc33c47d32f0ab3da (diff)
downloaddocutils-dd7cd1657e9fa2e768fefa75da2f59416c7b56cf.tar.gz
Moved template functionality from the PEP/HTML writer to the HTML writer. Expanded the fragments available in the ``parts`` attribute (via publish_parts fn).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4456 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test/DocutilsTestSupport.py')
-rw-r--r--test/DocutilsTestSupport.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/DocutilsTestSupport.py b/test/DocutilsTestSupport.py
index c30b263d6..b14c5c77e 100644
--- a/test/DocutilsTestSupport.py
+++ b/test/DocutilsTestSupport.py
@@ -769,7 +769,6 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase):
# interpolate standard variables:
expected = self.expected % {'version': docutils.__version__}
self.compare_output(self.input, output, expected)
-
standard_content_type_template = ('<meta http-equiv="Content-Type"'
' content="text/html; charset=%s" />\n')
@@ -787,10 +786,17 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase):
def format_output(self, parts):
"""Minimize & standardize the output."""
- # remove redundant parts:
+ # remove redundant parts & uninteresting parts:
del parts['whole']
assert parts['body'] == parts['fragment']
del parts['body']
+ del parts['body_pre_docinfo']
+ del parts['body_prefix']
+ del parts['body_suffix']
+ del parts['head']
+ del parts['head_prefix']
+ del parts['encoding']
+ del parts['version']
# remove standard portions:
parts['meta'] = parts['meta'].replace(self.standard_meta_value, '')
parts['html_head'] = parts['html_head'].replace(