From e5cb460d8b1965cbea42e6092456c62b94bcbb05 Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Mon, 11 Aug 2014 14:19:14 +0900 Subject: [PATCH] * update old XPath notation --- tests/test_directive_code.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index bc2609df8..b0da9a04f 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