3 # $Id: test_replace.py 4667 2006-07-12 21:40:56Z wiemann $
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for misc.py "replace" directive.
9 Test in french (not default/fallback language).
12 from __init__
import DocutilsTestSupport
16 s
= DocutilsTestSupport
.ParserTestSuite(suite_settings
={'language_code':'fr'})
17 s
.generateTests(totest
)
24 Test directive containing french role exposant (superscript).
26 .. |Na+| remplace:: Na\ :exp:`+`
28 Le |Na+| est l'ion sodium.
31 <document source="test data">
33 Test directive containing french role exposant (superscript).
34 <substitution_definition names="Na+">
40 <substitution_reference refname="Na+">
45 Test directive containing english role superscript.
47 .. |Na+| remplace:: Na\ :sup:`+`
49 Le |Na+| est l'ion sodium.
52 <document source="test data">
54 Test directive containing english role superscript.
55 <system_message level="1" line="3" source="test data" type="INFO">
57 No role entry for "sup" in module "docutils.parsers.rst.languages.fr".
58 Using English fallback for role "sup".
59 <substitution_definition names="Na+">
65 <substitution_reference refname="Na+">
67 est l\'ion sodium."""],
71 if __name__
== '__main__':
73 unittest
.main(defaultTest
='suite')