Website: add template and basic stylesheet with menu. Update buildhtml.py (and theref...
[docutils.git] / sandbox / gitpull / web_stylesheet_and_menu / test / test_parsers / test_rst / test_directives / test_class.py
blob474a01903711ad874636df67cfa15aebb2c43b35
1 #! /usr/bin/env python
3 # $Id$
4 # Author: Lea Wiemann <LeWiemann@gmail.com>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for the 'class' directive.
9 """
11 from __init__ import DocutilsTestSupport
13 def suite():
14 s = DocutilsTestSupport.ParserTestSuite()
15 s.generateTests(totest)
16 return s
18 totest = {}
20 totest['class'] = [
21 ["""\
22 .. class:: class1 class2
23 """,
24 """\
25 <document source="test data">
26 <pending>
27 .. internal attributes:
28 .transform: docutils.transforms.misc.ClassAttribute
29 .details:
30 class: ['class1', 'class2']
31 directive: 'class'
32 """],
33 ["""\
34 .. class:: class1 class2
36 The classes are applied to this paragraph.
38 And this one.
39 """,
40 """\
41 <document source="test data">
42 <paragraph classes="class1 class2">
43 The classes are applied to this paragraph.
44 <paragraph classes="class1 class2">
45 And this one.
46 """],
50 if __name__ == '__main__':
51 import unittest
52 unittest.main(defaultTest='suite')