mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix test_env.
This commit is contained in:
commit
32800b1762
@ -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]
|
||||
|
@ -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>',
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user