mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '1.7' into 4617_quickstart_argument_required
This commit is contained in:
commit
27d51cb406
6
.codecov.yml
Normal file
6
.codecov.yml
Normal file
@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
status:
|
||||
patch:
|
||||
default:
|
||||
# allowed to drop X% and still result in a "success" commit status
|
||||
threshold: 0.05
|
2
CHANGES
2
CHANGES
@ -19,6 +19,8 @@ Bugs fixed
|
||||
* #4608: epub: Invalid meta tag is generated
|
||||
* #4260: autodoc: keyword only argument separator is not disappeared if it is
|
||||
appeared at top of the argument list
|
||||
* #4622: epub: :confval:`epub_scheme` does not effect to content.opf
|
||||
* #4627: graphviz: Fit graphviz images to page
|
||||
* #4617: quickstart: PROJECT_DIR argument is required
|
||||
|
||||
Testing
|
||||
|
@ -341,7 +341,7 @@ def render_dot_latex(self, node, code, options, prefix='graphviz'):
|
||||
post = r'\hspace*{\fill}}'
|
||||
self.body.append('\n%s' % pre)
|
||||
|
||||
self.body.append(r'\includegraphics{%s}' % fname)
|
||||
self.body.append(r'\sphinxincludegraphics[]{%s}' % fname)
|
||||
|
||||
if not is_inline:
|
||||
self.body.append('%s\n' % post)
|
||||
|
@ -11,7 +11,7 @@
|
||||
<dc:contributor>{{ contributor }}</dc:contributor>
|
||||
<dc:publisher>{{ publisher }}</dc:publisher>
|
||||
<dc:rights>{{ copyright }}</dc:rights>
|
||||
<dc:identifier id="{{ uid }}">{{ id }}</dc:identifier>
|
||||
<dc:identifier id="{{ uid }}" opf:scheme="{{ scheme }}">{{ id }}</dc:identifier>
|
||||
<dc:date>{{ date }}</dc:date>
|
||||
<meta property="dcterms:modified">{{ date }}</meta>
|
||||
<meta property="ibooks:version">{{ version }}</meta>
|
||||
|
@ -767,7 +767,8 @@ def test_image_in_section(app, status, warning):
|
||||
assert ('\\chapter{Another section}' in result)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', confoverrides={'latex_logo': 'notfound.jpg'})
|
||||
@pytest.mark.sphinx('latex', testroot='basic',
|
||||
confoverrides={'latex_logo': 'notfound.jpg'})
|
||||
def test_latex_logo_if_not_found(app, status, warning):
|
||||
try:
|
||||
app.builder.build_all()
|
||||
|
@ -91,20 +91,20 @@ def test_graphviz_latex(app, status, warning):
|
||||
|
||||
content = (app.outdir / 'SphinxTests.tex').text()
|
||||
macro = ('\\\\begin{figure}\\[htbp\\]\n\\\\centering\n\\\\capstart\n\n'
|
||||
'\\\\includegraphics{graphviz-\\w+.pdf}\n'
|
||||
'\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n'
|
||||
'\\\\caption{caption of graph}\\\\label{.*}\\\\end{figure}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = 'Hello \\\\includegraphics{graphviz-\\w+.pdf} graphviz world'
|
||||
macro = 'Hello \\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf} graphviz world'
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = ('\\\\begin{wrapfigure}{r}{0pt}\n\\\\centering\n'
|
||||
'\\\\includegraphics{graphviz-\\w+.pdf}\n'
|
||||
'\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n'
|
||||
'\\\\caption{on right}\\\\label{.*}\\\\end{wrapfigure}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = (r'\{\\hfill'
|
||||
r'\\includegraphics{graphviz-.*}'
|
||||
r'\\sphinxincludegraphics\[\]{graphviz-.*}'
|
||||
r'\\hspace\*{\\fill}}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
|
@ -40,7 +40,7 @@ def test_inheritance_diagram_latex(app, status, warning):
|
||||
content = (app.outdir / 'Python.tex').text()
|
||||
|
||||
pattern = ('\\\\begin{figure}\\[htbp]\n\\\\centering\n\\\\capstart\n\n'
|
||||
'\\\\includegraphics{inheritance-\\w+.pdf}\n'
|
||||
'\\\\sphinxincludegraphics\\[\\]{inheritance-\\w+.pdf}\n'
|
||||
'\\\\caption{Test Foo!}\\\\label{\\\\detokenize{index:id1}}\\\\end{figure}')
|
||||
assert re.search(pattern, content, re.M)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user