~ubuntu-branches/ubuntu/jaunty/python-docutils/jaunty

« back to all changes in this revision

Viewing changes to test/test_transforms/test_class.py

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# Author: David Goodger
4
4
# Contact: goodger@users.sourceforge.net
5
 
# Revision: $Revision: 1.2 $
6
 
# Date: $Date: 2004/04/17 22:52:15 $
 
5
# Revision: $Revision: 3915 $
 
6
# Date: $Date: 2005-10-02 03:06:42 +0200 (Sun, 02 Oct 2005) $
7
7
# Copyright: This module has been placed in the public domain.
8
8
 
9
9
"""
30
30
""",
31
31
"""\
32
32
<document source="test data">
33
 
    <paragraph class="one">
 
33
    <paragraph classes="one">
34
34
        paragraph
35
35
"""],
36
36
["""\
42
42
"""\
43
43
<document source="test data">
44
44
    <comment xml:space="preserve">
45
 
    <block_quote class="two">
 
45
    <block_quote classes="two">
46
46
        <paragraph>
47
47
            Block quote
48
48
"""],
58
58
    <block_quote>
59
59
        <paragraph>
60
60
            Block quote
61
 
    <paragraph class="three">
 
61
    <paragraph classes="three">
62
62
        Paragraph
63
63
"""],
64
64
["""\
71
71
""",
72
72
"""\
73
73
<document source="test data">
74
 
    <section class="four" id="section-title" name="section title">
 
74
    <section classes="four" ids="section-title" names="section\ title">
75
75
        <title>
76
76
            Section Title
77
77
        <paragraph>
78
78
            Paragraph
79
79
"""],
80
80
["""\
 
81
.. class:: multiple
 
82
 
 
83
   paragraph 1
 
84
 
 
85
   paragraph 2
 
86
""",
 
87
"""\
 
88
<document source="test data">
 
89
    <paragraph classes="multiple">
 
90
        paragraph 1
 
91
    <paragraph classes="multiple">
 
92
        paragraph 2
 
93
"""],
 
94
["""\
 
95
.. class:: multiple
 
96
 
 
97
   .. Just a comment.  It's silly, but possible
 
98
""",
 
99
"""\
 
100
<document source="test data">
 
101
    <comment classes="multiple" xml:space="preserve">
 
102
        Just a comment.  It's silly, but possible
 
103
"""],
 
104
["""\
81
105
.. class::
82
106
 
83
107
.. class:: 99
96
120
        <literal_block xml:space="preserve">
97
121
            .. class:: 99
98
122
"""],
 
123
["""\
 
124
.. class:: one
 
125
.. class:: two
 
126
 
 
127
multiple class values may be assigned to one element
 
128
""",
 
129
"""\
 
130
<document source="test data">
 
131
    <paragraph classes="one two">
 
132
        multiple class values may be assigned to one element
 
133
"""],
 
134
["""\
 
135
.. class:: one two
 
136
 
 
137
multiple class values may be assigned to one element
 
138
""",
 
139
"""\
 
140
<document source="test data">
 
141
    <paragraph classes="one two">
 
142
        multiple class values may be assigned to one element
 
143
"""],
 
144
["""\
 
145
.. class:: fancy
 
146
 
 
147
2. List starts at 2.
 
148
3. Class should apply to list, not to system message.
 
149
""",
 
150
"""\
 
151
<document source="test data">
 
152
    <enumerated_list classes="fancy" enumtype="arabic" prefix="" start="2" suffix=".">
 
153
        <list_item>
 
154
            <paragraph>
 
155
                List starts at 2.
 
156
        <list_item>
 
157
            <paragraph>
 
158
                Class should apply to list, not to system message.
 
159
    <system_message level="1" line="3" source="test data" type="INFO">
 
160
        <paragraph>
 
161
            Enumerated list start value not ordinal-1: "2" (ordinal 2)
 
162
"""],
 
163
["""\
 
164
2. List starts at 2.
 
165
3. Class should apply to next paragraph, not to system message.
 
166
 
 
167
   .. class:: fancy
 
168
 
 
169
A paragraph.
 
170
""",
 
171
"""\
 
172
<document source="test data">
 
173
    <enumerated_list enumtype="arabic" prefix="" start="2" suffix=".">
 
174
        <list_item>
 
175
            <paragraph>
 
176
                List starts at 2.
 
177
        <list_item>
 
178
            <paragraph>
 
179
                Class should apply to next paragraph, not to system message.
 
180
    <system_message level="1" line="1" source="test data" type="INFO">
 
181
        <paragraph>
 
182
            Enumerated list start value not ordinal-1: "2" (ordinal 2)
 
183
    <paragraph classes="fancy">
 
184
        A paragraph.
 
185
"""],
99
186
])
100
187
 
101
188