4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
11 from __init__
import DocutilsTestSupport
14 s
= DocutilsTestSupport
.ParserTestSuite()
15 s
.generateTests(totest
)
20 totest
['comments'] = [
27 <document source="test data">
28 <comment xml:space="preserve">
40 <document source="test data">
41 <comment xml:space="preserve">
49 A comment consisting of multiple lines
50 starting on the line after the
51 explicit markup start.
54 <document source="test data">
55 <comment xml:space="preserve">
56 A comment consisting of multiple lines
57 starting on the line after the
58 explicit markup start.
67 <document source="test data">
68 <comment xml:space="preserve">
70 <comment xml:space="preserve">
82 <document source="test data">
83 <comment xml:space="preserve">
85 <system_message level="2" line="2" source="test data" type="WARNING">
87 Explicit markup ends without a blank line; unexpected unindent.
101 <document source="test data">
102 <comment xml:space="preserve">
104 <comment xml:space="preserve">
106 <system_message level="2" line="3" source="test data" type="WARNING">
108 Explicit markup ends without a blank line; unexpected unindent.
120 <document source="test data">
121 <comment xml:space="preserve">
130 The extra newline before the comment text prevents
131 the parser from recognizing a directive.
134 <document source="test data">
135 <comment xml:space="preserve">
138 The extra newline before the comment text prevents
139 the parser from recognizing a directive.
143 _comment: http://example.org
145 The extra newline before the comment text prevents
146 the parser from recognizing a hyperlink target.
149 <document source="test data">
150 <comment xml:space="preserve">
151 _comment: http://example.org
153 The extra newline before the comment text prevents
154 the parser from recognizing a hyperlink target.
158 [comment] Not a citation.
160 The extra newline before the comment text prevents
161 the parser from recognizing a citation.
164 <document source="test data">
165 <comment xml:space="preserve">
166 [comment] Not a citation.
168 The extra newline before the comment text prevents
169 the parser from recognizing a citation.
173 |comment| image:: bogus.png
175 The extra newline before the comment text prevents
176 the parser from recognizing a substitution definition.
179 <document source="test data">
180 <comment xml:space="preserve">
181 |comment| image:: bogus.png
183 The extra newline before the comment text prevents
184 the parser from recognizing a substitution definition.
187 .. Next is an empty comment, which serves to end this comment and
188 prevents the following block quote being swallowed up.
195 <document source="test data">
196 <comment xml:space="preserve">
197 Next is an empty comment, which serves to end this comment and
198 prevents the following block quote being swallowed up.
199 <comment xml:space="preserve">
214 <document source="test data">
216 <definition_list_item>
222 <comment xml:space="preserve">
224 <definition_list_item>
241 <document source="test data">
243 <definition_list_item>
249 <comment xml:space="preserve">
252 <definition_list_item>
264 .. comment between bullet paragraphs 2 and 3
269 <document source="test data">
270 <bullet_list bullet="+">
276 <comment xml:space="preserve">
277 comment between bullet paragraphs 2 and 3
284 .. comment between bullet paragraphs 1 (leader) and 2
289 <document source="test data">
290 <bullet_list bullet="+">
294 <comment xml:space="preserve">
295 comment between bullet paragraphs 1 (leader) and 2
305 <document source="test data">
306 <bullet_list bullet="+">
310 <comment xml:space="preserve">
315 if __name__
== '__main__':
317 unittest
.main(defaultTest
='suite')