3 # Author: David Goodger
4 # Contact: goodger@users.sourceforge.net
5 # Revision: $Revision: 3199 $
6 # Date: $Date: 2005-10-06 10:35:16 -0500 (Thu, 06 Oct 2005) $
7 # Copyright: This module has been placed in the public domain.
10 Tests for the "topic" directive.
13 from __init__
import DocutilsTestSupport
16 s
= DocutilsTestSupport
.ParserTestSuite()
17 s
.generateTests(totest
)
27 <document source="test data">
28 <system_message level="3" line="1" source="test data" type="ERROR">
30 Error in "topic" directive:
31 1 argument(s) required, 0 supplied.
32 <literal_block xml:space="preserve">
39 <document source="test data">
40 <system_message level="2" line="1" source="test data" type="WARNING">
42 Content block expected for the "topic" directive; none found.
43 <literal_block xml:space="preserve">
52 <document source="test data">
67 <document source="test data">
68 <system_message level="3" line="1" source="test data" type="ERROR">
70 Error in "topic" directive:
71 1 argument(s) required, 0 supplied.
72 <literal_block xml:space="preserve">
84 <document source="test data">
85 <system_message level="2" line="1" source="test data" type="WARNING">
87 Content block expected for the "topic" directive; none found.
88 <literal_block xml:space="preserve">
99 <document source="test data">
100 <system_message level="3" line="1" source="test data" type="ERROR">
102 Error in "topic" directive:
103 1 argument(s) required, 0 supplied.
104 <literal_block xml:space="preserve">
118 <document source="test data">
122 <system_message level="3" line="3" source="test data" type="ERROR">
124 The "topic" directive may not be used within topics or body elements.
125 <literal_block xml:space="preserve">
139 <document source="test data">
143 <system_message level="3" line="3" source="test data" type="ERROR">
145 The "topic" directive may not be used within topics or body elements.
146 <literal_block xml:space="preserve">
150 <system_message level="2" line="6" source="test data" type="WARNING">
152 Explicit markup ends without a blank line; unexpected unindent.
168 <document source="test data">
172 <system_message level="3" line="3" source="test data" type="ERROR">
174 The "topic" directive may not be used within topics or body elements.
175 <literal_block xml:space="preserve">
194 <document source="test data">
219 <document source="test data">
238 if __name__
== '__main__':
240 unittest
.main(defaultTest
='suite')