Spelling fixes
[docutils.git] / test / test_parsers / test_rst / test_doctest_blocks.py
blob9de95a25a0079c1ffc12b3da80a04242c1c87bfa
1 #! /usr/bin/env python
3 # $Id$
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for states.py.
9 """
11 from __init__ import DocutilsTestSupport
13 def suite():
14 s = DocutilsTestSupport.ParserTestSuite()
15 s.generateTests(totest)
16 return s
18 totest = {}
20 totest['doctest_blocks'] = [
21 ["""\
22 Paragraph.
24 >>> print "Doctest block."
25 Doctest block.
27 Paragraph.
28 """,
29 """\
30 <document source="test data">
31 <paragraph>
32 Paragraph.
33 <doctest_block xml:space="preserve">
34 >>> print "Doctest block."
35 Doctest block.
36 <paragraph>
37 Paragraph.
38 """],
39 ["""\
40 Paragraph.
42 >>> print " Indented output."
43 Indented output.
44 """,
45 """\
46 <document source="test data">
47 <paragraph>
48 Paragraph.
49 <doctest_block xml:space="preserve">
50 >>> print " Indented output."
51 Indented output.
52 """],
53 ["""\
54 Paragraph.
56 >>> print " Indented block & output."
57 Indented block & output.
58 """,
59 """\
60 <document source="test data">
61 <paragraph>
62 Paragraph.
63 <block_quote>
64 <doctest_block xml:space="preserve">
65 >>> print " Indented block & output."
66 Indented block & output.
67 """],
70 if __name__ == '__main__':
71 import unittest
72 unittest.main(defaultTest='suite')