4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for docutils.transforms.peps.
11 from __init__
import DocutilsTestSupport
12 from docutils
.transforms
.peps
import TargetNotes
13 from docutils
.parsers
.rst
import Parser
18 s
= DocutilsTestSupport
.TransformTestSuite(parser
)
19 s
.generateTests(totest
)
24 totest
['target_notes'] = ((TargetNotes
,), [
26 No references or targets exist, therefore
27 no "References" section should be generated.
30 <document source="test data">
32 No references or targets exist, therefore
33 no "References" section should be generated.
36 A target exists, here's the reference_.
37 A "References" section should be generated.
39 .. _reference: http://www.example.org
42 <document source="test data">
44 A target exists, here's the \n\
45 <reference name="reference" refname="reference">
48 <footnote_reference auto="1" ids="id3" refname="TARGET_NOTE: id2">
50 A "References" section should be generated.
51 <target ids="reference" names="reference" refuri="http://www.example.org">
55 <footnote auto="1" ids="id2" names="TARGET_NOTE:\ id2">
57 <reference refuri="http://www.example.org">
58 http://www.example.org
64 if __name__
== '__main__':
66 unittest
.main(defaultTest
='suite')