mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix nits.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
sphinx.addons
|
sphinx.ext
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
Contains Sphinx features not activated by default.
|
Contains Sphinx features not activated by default.
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
Uses the basestring encode function from simplejson.
|
Uses the basestring encode function from simplejson.
|
||||||
|
|
||||||
:copyright: Copyright 2008 by Armin Ronacher, Bob Ippolito.
|
:copyright: 2008 by Armin Ronacher, Bob Ippolito.
|
||||||
:license: BSD.
|
:license: BSD.
|
||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
This module imports JSON functions from various locations.
|
This module imports JSON functions from various locations.
|
||||||
|
|
||||||
:copyright: Copyright 2008 by Armin Ronacher.
|
:copyright: 2008 by Armin Ronacher.
|
||||||
:license: BSD.
|
:license: BSD.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -149,7 +149,8 @@ htmlhelp_basename = 'SphinxTestsdoc'
|
|||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title, author, document class [howto/manual]).
|
# (source start file, target name, title, author, document class [howto/manual]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation', 'Georg Brandl', 'manual'),
|
('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation',
|
||||||
|
'Georg Brandl', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
|
|||||||
+2
-1
@@ -28,7 +28,8 @@ latex_warnfile = StringIO()
|
|||||||
ENV_WARNINGS = """\
|
ENV_WARNINGS = """\
|
||||||
WARNING: %(root)s/images.txt:9: Image file not readable: foo.png
|
WARNING: %(root)s/images.txt:9: Image file not readable: foo.png
|
||||||
WARNING: %(root)s/images.txt:20: Nonlocal image URI found: http://www.python.org/logo.png
|
WARNING: %(root)s/images.txt:20: Nonlocal image URI found: http://www.python.org/logo.png
|
||||||
WARNING: %(root)s/includes.txt:: (WARNING/2) Encoding 'utf-8' used for reading included file u'wrongenc.inc' seems to be wrong, try giving an :encoding: option
|
WARNING: %(root)s/includes.txt:: (WARNING/2) Encoding 'utf-8' used for reading included \
|
||||||
|
file u'wrongenc.inc' seems to be wrong, try giving an :encoding: option
|
||||||
"""
|
"""
|
||||||
|
|
||||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||||
|
|||||||
+2
-1
@@ -61,7 +61,8 @@ def test_images():
|
|||||||
latexbuilder = LaTeXBuilder(app, env)
|
latexbuilder = LaTeXBuilder(app, env)
|
||||||
latexbuilder.post_process_images(tree)
|
latexbuilder.post_process_images(tree)
|
||||||
assert "no matching candidate for image URI u'foo.*'" in app._warning.content[-1]
|
assert "no matching candidate for image URI u'foo.*'" in app._warning.content[-1]
|
||||||
assert set(latexbuilder.images.keys()) == set(['subdir/img.png', 'img.png', 'img.pdf'])
|
assert set(latexbuilder.images.keys()) == set(['subdir/img.png',
|
||||||
|
'img.png', 'img.pdf'])
|
||||||
assert set(latexbuilder.images.values()) == set(['img.pdf', 'img.png', 'img1.png'])
|
assert set(latexbuilder.images.values()) == set(['img.pdf', 'img.png', 'img1.png'])
|
||||||
|
|
||||||
def test_second_update():
|
def test_second_update():
|
||||||
|
|||||||
Reference in New Issue
Block a user