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

« back to all changes in this revision

Viewing changes to test/test_rst/test_paragraphs.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:
1
 
#! /usr/bin/env python
2
 
 
3
 
"""
4
 
:Author: David Goodger
5
 
:Contact: goodger@users.sourceforge.net
6
 
:Revision: $Revision: 1.2 $
7
 
:Date: $Date: 2002/04/25 03:43:35 $
8
 
:Copyright: This module has been placed in the public domain.
9
 
 
10
 
Tests for states.py.
11
 
"""
12
 
 
13
 
from __init__ import DocutilsTestSupport
14
 
 
15
 
def suite():
16
 
    s = DocutilsTestSupport.ParserTestSuite()
17
 
    s.generateTests(totest)
18
 
    return s
19
 
 
20
 
totest = {}
21
 
 
22
 
totest['paragraphs'] = [
23
 
["""\
24
 
A paragraph.
25
 
""",
26
 
"""\
27
 
<document>
28
 
    <paragraph>
29
 
        A paragraph.
30
 
"""],
31
 
["""\
32
 
Paragraph 1.
33
 
 
34
 
Paragraph 2.
35
 
""",
36
 
"""\
37
 
<document>
38
 
    <paragraph>
39
 
        Paragraph 1.
40
 
    <paragraph>
41
 
        Paragraph 2.
42
 
"""],
43
 
["""\
44
 
Line 1.
45
 
Line 2.
46
 
Line 3.
47
 
""",
48
 
"""\
49
 
<document>
50
 
    <paragraph>
51
 
        Line 1.
52
 
        Line 2.
53
 
        Line 3.
54
 
"""],
55
 
["""\
56
 
Paragraph 1, Line 1.
57
 
Line 2.
58
 
Line 3.
59
 
 
60
 
Paragraph 2, Line 1.
61
 
Line 2.
62
 
Line 3.
63
 
""",
64
 
"""\
65
 
<document>
66
 
    <paragraph>
67
 
        Paragraph 1, Line 1.
68
 
        Line 2.
69
 
        Line 3.
70
 
    <paragraph>
71
 
        Paragraph 2, Line 1.
72
 
        Line 2.
73
 
        Line 3.
74
 
"""],
75
 
]
76
 
 
77
 
if __name__ == '__main__':
78
 
    import unittest
79
 
    unittest.main(defaultTest='suite')