summaryrefslogtreecommitdiff
path: root/tests/test_build.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-18 22:12:03 +0100
committerGeorg Brandl <georg@python.org>2009-02-18 22:12:03 +0100
commit5ce51fe2e2bc0e525a79f1bda7eba2f25825adb7 (patch)
tree1b0b9d883cae494c6a27c0ed81b249d1aaf4c07d /tests/test_build.py
parent99cd1e2e0b67d41ed8319591d255df626193cf2b (diff)
downloadsphinx-5ce51fe2e2bc0e525a79f1bda7eba2f25825adb7.tar.gz
Test add_description_unit in test suite.
Diffstat (limited to 'tests/test_build.py')
-rw-r--r--tests/test_build.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_build.py b/tests/test_build.py
index 326a4bd6..5b84a9da 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -88,6 +88,9 @@ HTML_XPATH = {
".//dt[@id='mod.Cls.meth1']": '',
".//dt[@id='errmod.Error']": '',
".//a[@href='#mod.Cls']": '',
+ ".//dl[@class='userdesc']": '',
+ ".//dt[@id='userdescrole-myobj']": '',
+ ".//a[@href='#userdescrole-myobj']": '',
},
'contents.html': {
".//meta[@name='hc'][@content='hcval']": '',
@@ -147,9 +150,8 @@ def test_html(app):
etree = ET.parse(os.path.join(app.outdir, fname), parser)
for path, check in paths.iteritems():
nodes = list(etree.findall(path))
- if not nodes:
- import pdb; pdb.set_trace()
- assert nodes != []
+ assert nodes != [], ('did not find any node matching xpath '
+ '%r in file %s' % (path, fname))
if hasattr(check, '__call__'):
check(nodes)
elif not check: