Website: add template and basic stylesheet with menu. Update buildhtml.py (and theref...
[docutils.git] / sandbox / gitpull / web_stylesheet_and_menu / test / test_transforms / test_expose_internals.py
blobc3af795731094eb9d96735b389839163d3ff8bf0
1 #! /usr/bin/env python
3 # $Id$
4 # Author: Lea Wiemann <LeWiemann@gmail.com>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Test module for universal.ExposeInternals transform.
9 """
12 from __init__ import DocutilsTestSupport # must be imported before docutils
13 from docutils.transforms.universal import ExposeInternals
14 from docutils.parsers.rst import Parser
16 def suite():
17 parser = Parser()
18 s = DocutilsTestSupport.TransformTestSuite(
19 parser, suite_settings={'expose_internals': ['rawsource', 'source']})
20 s.generateTests(totest)
21 return s
24 totest = {}
26 totest['transitions'] = ((ExposeInternals,), [
27 ["""\
28 This is a test.
29 """,
30 """\
31 <document internal:rawsource="" source="test data">
32 <paragraph internal:rawsource="This is a test." internal:source="test data">
33 This is a test.
34 """],
38 if __name__ == '__main__':
39 import unittest
40 unittest.main(defaultTest='suite')