~ubuntu-branches/ubuntu/karmic/python-docutils/karmic

« back to all changes in this revision

Viewing changes to test/test_rst/test_doctest_blocks.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:42:11 $
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['doctest_blocks'] = [
23
 
["""\
24
 
Paragraph.
25
 
 
26
 
>>> print "Doctest block."
27
 
Doctest block.
28
 
 
29
 
Paragraph.
30
 
""",
31
 
"""\
32
 
<document>
33
 
    <paragraph>
34
 
        Paragraph.
35
 
    <doctest_block>
36
 
        >>> print "Doctest block."
37
 
        Doctest block.
38
 
    <paragraph>
39
 
        Paragraph.
40
 
"""],
41
 
["""\
42
 
Paragraph.
43
 
 
44
 
>>> print "    Indented output."
45
 
    Indented output.
46
 
""",
47
 
"""\
48
 
<document>
49
 
    <paragraph>
50
 
        Paragraph.
51
 
    <doctest_block>
52
 
        >>> print "    Indented output."
53
 
            Indented output.
54
 
"""],
55
 
["""\
56
 
Paragraph.
57
 
 
58
 
    >>> print "    Indented block & output."
59
 
        Indented block & output.
60
 
""",
61
 
"""\
62
 
<document>
63
 
    <paragraph>
64
 
        Paragraph.
65
 
    <block_quote>
66
 
        <doctest_block>
67
 
            >>> print "    Indented block & output."
68
 
                Indented block & output.
69
 
"""],
70
 
]
71
 
 
72
 
if __name__ == '__main__':
73
 
    import unittest
74
 
    unittest.main(defaultTest='suite')