4 # Author: Guenter Milde
5 # Copyright: This module has been placed in the public domain.
8 Test the 'code' directive in body.py with syntax_highlight = 'long'.
11 from __init__
import DocutilsTestSupport
12 from docutils
.utils
.code_analyzer
import with_pygments
15 s
= DocutilsTestSupport
.ParserTestSuite(suite_settings
={'syntax_highlight':'long'})
17 s
.generateTests(totest
)
22 totest
['code-parsing-long'] = [
31 # and now for something completely different
35 <document source="test data">
36 <literal_block classes="code python" xml:space="preserve">
39 <inline classes="keyword">
42 <inline classes="name function">
44 <inline classes="punctuation">
50 <inline classes="literal string doc">
54 <inline classes="literal string doc">
63 <inline classes="comment">
64 # and now for something completely different
69 <inline classes="keyword">
72 <inline classes="literal number integer">
74 <inline classes="operator">
76 <inline classes="literal number integer">
82 hello \emph{world} % emphasize
85 <document source="test data">
86 <literal_block classes="code latex" xml:space="preserve">
88 <inline classes="keyword">
90 <inline classes="name builtin">
93 <inline classes="name builtin">
96 <inline classes="comment">
101 if __name__
== '__main__':
103 unittest
.main(defaultTest
='suite')