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_target_notes.py
blob2991a5996434044799a89cdada0734485291cf42
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 the target-notes directives.
9 """
11 from __init__ import DocutilsTestSupport
13 def suite():
14 s = DocutilsTestSupport.ParserTestSuite()
15 s.generateTests(totest)
16 return s
18 totest = {}
20 totest['target-notes'] = [
21 ["""\
22 .. target-notes::
23 """,
24 """\
25 <document source="test data">
26 <pending>
27 .. internal attributes:
28 .transform: docutils.transforms.references.TargetNotes
29 .details:
30 """],
31 ["""\
32 .. target-notes:: :class: custom
33 """,
34 """\
35 <document source="test data">
36 <pending>
37 .. internal attributes:
38 .transform: docutils.transforms.references.TargetNotes
39 .details:
40 class: ['custom']
41 """],
42 ["""\
43 .. target-notes::
44 :class: custom
45 :name: targets
46 """,
47 """\
48 <document source="test data">
49 <pending ids="targets" names="targets">
50 .. internal attributes:
51 .transform: docutils.transforms.references.TargetNotes
52 .details:
53 class: ['custom']
54 """],
55 ["""\
56 .. target-notes::
57 :class:
58 """,
59 """\
60 <document source="test data">
61 <system_message level="3" line="1" source="test data" type="ERROR">
62 <paragraph>
63 Error in "target-notes" directive:
64 invalid option value: (option: "class"; value: None)
65 argument required but none supplied.
66 <literal_block xml:space="preserve">
67 .. target-notes::
68 :class:
69 """],
73 if __name__ == '__main__':
74 import unittest
75 unittest.main(defaultTest='suite')