5
:Contact: goodger@users.sourceforge.net
6
:Revision: $Revision: 1.2 $
7
:Date: $Date: 2002/04/25 03:46:23 $
8
:Copyright: This module has been placed in the public domain.
10
Tests for transition markers.
13
from __init__ import DocutilsTestSupport
16
s = DocutilsTestSupport.ParserTestSuite()
17
s.generateTests(totest)
22
# See DocutilsTestSupport.ParserTestSuite.generateTests for a
23
# description of the 'totest' data structure.
24
totest['transitions'] = [
26
Test transition markers.
35
Test transition markers.
43
First text division of section 1.
47
Second text division of section 1.
51
Paragraph 2 in section 2.
55
<section id="section-1" name="section 1">
59
First text division of section 1.
62
Second text division of section 1.
63
<section id="section-2" name="section 2">
67
Paragraph 2 in section 2.
72
A section or document may not begin with a transition.
74
The DTD specifies that two transitions may not
83
The DTD also specifies that a section or document
84
may not end with a transition.
90
<system_message level="3" type="ERROR">
92
Document or section may not begin with a transition (line 1).
95
A section or document may not begin with a transition.
97
The DTD specifies that two transitions may not
100
<system_message level="3" type="ERROR">
102
At least one body element must separate transitions; adjacent transitions at line 10.
104
<system_message level="3" type="ERROR">
106
At least one body element must separate transitions; adjacent transitions at line 12.
109
The DTD also specifies that a section or document
110
may not end with a transition.
112
<system_message level="3" type="ERROR">
114
Document or section may not end with a transition (line 17).
117
Test unexpected transition markers.
128
Test unexpected transition markers.
132
<system_message level="4" type="SEVERE">
134
Unexpected section title or transition at line 5.
142
if __name__ == '__main__':
144
unittest.main(defaultTest='suite')