summaryrefslogtreecommitdiff
path: root/tests/test_markup.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-28 18:43:40 +0200
committerGeorg Brandl <georg@python.org>2010-07-28 18:43:40 +0200
commitec5a5e739bd93273be9649250443c1267069b203 (patch)
tree85432ca89066315dacf89c686e87cb5aa463d94a /tests/test_markup.py
parent24f1d4c12d76b4eb90818b3a10e0cb26ca120a0d (diff)
downloadsphinx-git-ec5a5e739bd93273be9649250443c1267069b203.tar.gz
Move the "b" function to pycompat.
Diffstat (limited to 'tests/test_markup.py')
-rw-r--r--tests/test_markup.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/test_markup.py b/tests/test_markup.py
index 6d6badbbc..092113bbe 100644
--- a/tests/test_markup.py
+++ b/tests/test_markup.py
@@ -10,7 +10,6 @@
"""
import re
-import sys
from util import *
@@ -18,15 +17,10 @@ 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
-if sys.version_info > (3, 0):
- def b(s):
- return s.encode('utf-8')
-else:
- b = str
-
def setup_module():
global app, settings, parser
texescape.init() # otherwise done by the latex builder