Commits

Georg Brandl  committed aa7b4aa Merge

Fix test_env.

  • Participants
  • Parent commits 7073334, 77cd755

Comments (0)

Files changed (3)

File sphinx/pycode/__init__.py

             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]

File tests/test_build.py

     '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>',

File tests/test_env.py

     (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)