summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-08-11 14:19:14 +0900
committershimizukawa <shimizukawa@gmail.com>2014-08-11 14:19:14 +0900
commit03244acf6de61228665a2f67f56a0e8716c213bc (patch)
tree9a70d0afb6b37de12f1f7a0d3ee2b3e796172a68
parent8484f107f8e18f7c22c9b4d664071583cd7bcacd (diff)
downloadsphinx-03244acf6de61228665a2f67f56a0e8716c213bc.tar.gz
* update old XPath notation
-rw-r--r--tests/test_directive_code.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py
index bc2609df..b0da9a04 100644
--- a/tests/test_directive_code.py
+++ b/tests/test_directive_code.py
@@ -25,7 +25,7 @@ def teardown_module():
def test_code_block(app):
app.builder.build('index')
et = ElementTree.parse(app.outdir / 'index.xml')
- secs = et.findall('/section/section')
+ secs = et.findall('./section/section')
code_block = secs[0].findall('literal_block')
assert len(code_block) > 0
actual = code_block[0].text
@@ -56,7 +56,7 @@ def test_code_block_dedent(app):
app.builder.build(['dedent'], method='specific')
et = ElementTree.parse(app.outdir / 'dedent.xml')
- secs = et.findall('/section/section')
+ secs = et.findall('./section/section')
code_block = secs[0].findall('literal_block')
assert len(code_block) > 0
@@ -83,7 +83,7 @@ def test_code_block_dedent(app):
def test_literal_include(app):
app.builder.build('index')
et = ElementTree.parse(app.outdir / 'index.xml')
- secs = et.findall('/section/section')
+ secs = et.findall('./section/section')
literal_include = secs[1].findall('literal_block')
literal_src = (app.srcdir / 'literal.inc').text(encoding='utf-8')
assert len(literal_include) > 0
@@ -112,7 +112,7 @@ def test_literal_include_dedent(app):
app.builder.build(['dedent'])
et = ElementTree.parse(app.outdir / 'dedent.xml')
- secs = et.findall('/section/section')
+ secs = et.findall('./section/section')
literal_include = secs[1].findall('literal_block')
assert len(literal_include) > 0