summaryrefslogtreecommitdiff
path: root/tests/test_intl.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-29 21:12:40 +0900
committerGitHub <noreply@github.com>2018-09-29 21:12:40 +0900
commit973c3ffa25f6f14e53382f7a45ffbeee9d252b3c (patch)
treed4d500f2dad3bbdab82820f1f4bb2ae5bc97a6ff /tests/test_intl.py
parentabcb5bd5eca6ea46ffcc34a55b663083d03f339c (diff)
parentd2c3d54bb9a46c5e7a0d14c3345e489d7592de9a (diff)
downloadsphinx-git-973c3ffa25f6f14e53382f7a45ffbeee9d252b3c.tar.gz
Merge branch 'master' into change_master_doc_to_index
Diffstat (limited to 'tests/test_intl.py')
-rw-r--r--tests/test_intl.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/test_intl.py b/tests/test_intl.py
index 6b1c0236a..8a83b711a 100644
--- a/tests/test_intl.py
+++ b/tests/test_intl.py
@@ -18,7 +18,6 @@ import re
import pytest
from babel.messages import pofile, mofile
from docutils import nodes
-from six import string_types
from sphinx.testing.util import (
path, etree_parse, strip_escseq,
@@ -78,20 +77,7 @@ def _info(app):
def elem_gettexts(elem):
- def itertext(self):
- # this function copied from Python-2.7 'ElementTree.itertext'.
- # for compatibility to Python-2.6
- tag = self.tag
- if not isinstance(tag, string_types) and tag is not None:
- return
- if self.text:
- yield self.text
- for e in self:
- for s in itertext(e):
- yield s
- if e.tail:
- yield e.tail
- return [_f for _f in [s.strip() for s in itertext(elem)] if _f]
+ return [_f for _f in [s.strip() for s in elem.itertext()] if _f]
def elem_getref(elem):