~ubuntu-branches/ubuntu/hardy/python-docutils/hardy

« back to all changes in this revision

Viewing changes to test/test_transforms/test_writer_aux.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
# Author: Felix Wiemann
 
4
# Contact: Felix_Wiemann@ososo.de
 
5
# Revision: $Revision: 4132 $
 
6
# Date: $Date: 2005-12-03 03:13:12 +0100 (Sat, 03 Dec 2005) $
 
7
# Copyright: This module has been placed in the public domain.
 
8
 
 
9
"""
 
10
Test module for writer_aux transforms.
 
11
"""
 
12
 
 
13
from __init__ import DocutilsTestSupport # must be imported before docutils
 
14
from docutils.transforms import writer_aux
 
15
from docutils.parsers.rst import Parser
 
16
 
 
17
def suite():
 
18
    parser = Parser()
 
19
    s = DocutilsTestSupport.TransformTestSuite(parser)
 
20
    s.generateTests(totest)
 
21
    return s
 
22
 
 
23
 
 
24
totest = {}
 
25
 
 
26
totest['compound'] = ((writer_aux.Compound,), [
 
27
["""\
 
28
.. class:: compound
 
29
 
 
30
.. compound::
 
31
 
 
32
   .. class:: paragraph1
 
33
 
 
34
   Paragraph 1.
 
35
 
 
36
   .. class:: paragraph2
 
37
 
 
38
   Paragraph 2.
 
39
 
 
40
       Block quote.
 
41
""",
 
42
"""\
 
43
<document source="test data">
 
44
    <paragraph classes="paragraph1 compound">
 
45
        Paragraph 1.
 
46
    <paragraph classes="paragraph2 continued">
 
47
        Paragraph 2.
 
48
    <block_quote classes="continued">
 
49
        <paragraph>
 
50
            Block quote.
 
51
"""],
 
52
])
 
53
 
 
54
 
 
55
if __name__ == '__main__':
 
56
    import unittest
 
57
    unittest.main(defaultTest='suite')