4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for the "topic" directive.
11 from __init__
import DocutilsTestSupport
14 s
= DocutilsTestSupport
.ParserTestSuite()
15 s
.generateTests(totest
)
25 <document source="test data">
26 <system_message level="3" line="1" source="test data" type="ERROR">
28 Error in "topic" directive:
29 1 argument(s) required, 0 supplied.
30 <literal_block xml:space="preserve">
37 <document source="test data">
38 <system_message level="3" line="1" source="test data" type="ERROR">
40 Content block expected for the "topic" directive; none found.
41 <literal_block xml:space="preserve">
50 <document source="test data">
58 .. topic:: With Options
65 <document source="test data">
66 <topic classes="custom" ids="my-point" names="my\ point">
80 <document source="test data">
81 <system_message level="3" line="1" source="test data" type="ERROR">
83 Error in "topic" directive:
84 1 argument(s) required, 0 supplied.
85 <literal_block xml:space="preserve">
97 <document source="test data">
98 <system_message level="3" line="1" source="test data" type="ERROR">
100 Content block expected for the "topic" directive; none found.
101 <literal_block xml:space="preserve">
112 <document source="test data">
113 <system_message level="3" line="1" source="test data" type="ERROR">
115 Error in "topic" directive:
116 1 argument(s) required, 0 supplied.
117 <literal_block xml:space="preserve">
131 <document source="test data">
135 <system_message level="3" line="3" source="test data" type="ERROR">
137 The "topic" directive may not be used within topics or body elements.
138 <literal_block xml:space="preserve">
152 <document source="test data">
156 <system_message level="3" line="3" source="test data" type="ERROR">
158 The "topic" directive may not be used within topics or body elements.
159 <literal_block xml:space="preserve">
163 <system_message level="2" line="6" source="test data" type="WARNING">
165 Explicit markup ends without a blank line; unexpected unindent.
181 <document source="test data">
185 <system_message level="3" line="3" source="test data" type="ERROR">
187 The "topic" directive may not be used within topics or body elements.
188 <literal_block xml:space="preserve">
207 <document source="test data">
232 <document source="test data">
251 if __name__
== '__main__':
253 unittest
.main(defaultTest
='suite')