summaryrefslogtreecommitdiff
path: root/tests/test_markup.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_markup.py')
-rw-r--r--tests/test_markup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_markup.py b/tests/test_markup.py
index 51d4e724..5d56bea3 100644
--- a/tests/test_markup.py
+++ b/tests/test_markup.py
@@ -17,6 +17,7 @@ from docutils import frontend, utils, nodes
from docutils.parsers import rst
from sphinx.util import texescape
+from sphinx.util.pycompat import b
from sphinx.writers.html import HTMLWriter, SmartyPantsHTMLTranslator
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
@@ -50,7 +51,7 @@ class ForgivingLaTeXTranslator(LaTeXTranslator, ForgivingTranslator):
def verify_re(rst, html_expected, latex_expected):
- document = utils.new_document('test data', settings)
+ document = utils.new_document(b('test data'), settings)
document['file'] = 'dummy'
parser.parse(rst, document)
for msg in document.traverse(nodes.system_message):
@@ -83,14 +84,14 @@ def test_inline():
_html = ('<p><tt class="(samp )?docutils literal"><span class="pre">'
'code</span>&nbsp;&nbsp; <span class="pre">sample</span></tt></p>')
yield verify_re, '``code sample``', _html, r'\\code{code sample}'
- yield verify_re, ':samp:`code sample`', _html, r'\\samp{code sample}'
+ yield verify_re, ':samp:`code sample`', _html, r'\\code{code sample}'
# interpolation of braces in samp and file roles (HTML only)
yield (verify, ':samp:`a{b}c`',
'<p><tt class="samp docutils literal"><span class="pre">a</span>'
'<em><span class="pre">b</span></em>'
'<span class="pre">c</span></tt></p>',
- '\\samp{abc}')
+ '\\code{a\\emph{b}c}')
# interpolation of arrows in menuselection
yield (verify, ':menuselection:`a --> b`',