4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for the "header" & "footer" directives.
11 from __init__
import DocutilsTestSupport
14 s
= DocutilsTestSupport
.ParserTestSuite()
15 s
.generateTests(totest
)
22 .. header:: a paragraph for the header
25 <document source="test data">
29 a paragraph for the header
35 <document source="test data">
36 <system_message level="3" line="1" source="test data" type="ERROR">
38 Content block expected for the "header" directive; none found.
39 <literal_block xml:space="preserve">
43 .. header:: first part of the header
44 .. header:: second part of the header
47 <document source="test data">
51 first part of the header
53 second part of the header
59 .. footer:: a paragraph for the footer
62 <document source="test data">
66 a paragraph for the footer
69 .. footer:: even if a footer is declared first
70 .. header:: the header appears first
73 <document source="test data">
77 the header appears first
80 even if a footer is declared first
85 if __name__
== '__main__':
87 unittest
.main(defaultTest
='suite')