Fix test_env.

This commit is contained in:
Georg Brandl 2009-03-16 22:47:52 +01:00
commit 32800b1762
3 changed files with 4 additions and 3 deletions

View File

@ -168,7 +168,7 @@ class ModuleAnalyzer(object):
filename = getattr(mod, '__file__', None)
if filename is None:
raise PycodeError('no source found for module %r' % modname)
filename = path.normpath(filename)
filename = path.normpath(path.abspath(filename))
lfilename = filename.lower()
if lfilename.endswith('.pyo') or lfilename.endswith('.pyc'):
filename = filename[:-1]

View File

@ -108,7 +108,8 @@ HTML_XPATH = {
'contents.html': {
".//meta[@name='hc'][@content='hcval']": '',
".//meta[@name='testopt'][@content='testoverride']": '',
".//td[@class='label']": r'\[Ref1\]',
#".//td[@class='label']": r'\[Ref1\]', # docutils 0.5 only
".//td[@class='label']": '',
".//li[@class='toctree-l1']/a": 'Testing various markup',
".//li[@class='toctree-l2']/a": 'Admonitions',
".//title": 'Sphinx <Tests>',

View File

@ -80,7 +80,7 @@ def test_second_update():
(root / 'autodoc.txt').unlink()
(root / 'new.txt').write_text('New file\n========\n')
msg, num, it = env.update(app.config, app.srcdir, app.doctreedir, app)
assert '1 added, 4 changed, 1 removed' in msg
assert '1 added, 3 changed, 1 removed' in msg
docnames = set()
for docname in it:
docnames.add(docname)