add project gutenberg
[docutils.git] / test / test_transforms / test_strip_comments.py
blob7d1278d14b536ae7348b5c23b31435dc7caeed1f
1 #! /usr/bin/env python
3 # $Id$
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for docutils.transforms.universal.StripComments.
9 """
11 from __init__ import DocutilsTestSupport
12 from docutils.transforms.universal import StripComments
13 from docutils.parsers.rst import Parser
16 def suite():
17 parser = Parser()
18 s = DocutilsTestSupport.TransformTestSuite(
19 parser, suite_settings={'strip_comments': 1})
20 s.generateTests(totest)
21 return s
23 totest = {}
25 totest['strip_comments'] = ((StripComments,), [
26 ["""\
27 .. this is a comment
29 Title
30 =====
32 Paragraph.
33 """,
34 """\
35 <document source="test data">
36 <section ids="title" names="title">
37 <title>
38 Title
39 <paragraph>
40 Paragraph.
41 """],
45 if __name__ == '__main__':
46 import unittest
47 unittest.main(defaultTest='suite')