#!/usr/bin/env python # $Id: test_html4css1_template.py 7770 2014-07-08 11:00:46Z grubert $ # Author: David Goodger # Copyright: This module has been placed in the public domain. """ Tests for the HTML writer. """ import os import platform from __init__ import DocutilsTestSupport def suite(): settings = {'template': os.path.join(DocutilsTestSupport.testroot, 'data', 'full-template.txt'), 'stylesheet_path': '/test.css', 'embed_stylesheet': 0,} s = DocutilsTestSupport.PublishTestSuite('html', suite_settings=settings) s.generateTests(totest) return s if platform.system() == "Windows": drive_prefix = "C:" else: drive_prefix = "" totest = {} totest['template'] = [ ["""\ ================ Document Title ================ ---------- Subtitle ---------- :Author: Me .. footer:: footer text Section ======= Some text. """, r'''head_prefix = """\ """ head = """\ Document Title """ stylesheet = """\ """ body_prefix = """\ """ body_pre_docinfo = """\ Document Title Subtitle""" docinfo = """\ Author: Me """ body = """\ Section Some text. """ body_suffix = """\ """ head_prefix = """\ """ head = """\ Document Title """ stylesheet = """\ """ body_prefix = """\ """ body_pre_docinfo = """\ Document Title Subtitle""" docinfo = """\ Author: Me """ body = """\ Section Some text. """ body_suffix = """\ """ title = """\ Document Title""" subtitle = """\ Subtitle""" header = """\ """ footer = """\ """ meta = """\ """ fragment = """\ Section Some text. """ html_prolog = """\ """ html_head = """\ Document Title """ html_title = """\ Document Title""" html_subtitle = """\ Subtitle""" html_body = """\ Document Title Subtitle Author: Me Section Some text. """ ''' % {'version': DocutilsTestSupport.docutils.__version__, 'drive': drive_prefix, }] ] if __name__ == '__main__': import unittest unittest.main(defaultTest='suite')
Some text.