diff options
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r-- | tests/test_build_latex.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 24ce0050a..c83b9c5f8 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -1042,3 +1042,15 @@ def test_latex_raw_directive(app, status, warning): # with substitution assert 'HTML: abc ghi' in result assert 'LaTeX: abc def ghi' in result + + +@pytest.mark.sphinx('latex', testroot='images') +def test_latex_remote_images(app, status, warning): + app.builder.build_all() + + result = (app.outdir / 'Python.tex').text(encoding='utf8') + assert '\\sphinxincludegraphics{{python-logo}.png}' in result + assert (app.outdir / 'python-logo.png').exists() + assert '\\sphinxincludegraphics{{NOT_EXIST}.PNG}' not in result + assert ('WARNING: Could not fetch remote image: ' + 'http://example.com/NOT_EXIST.PNG [404]' in warning.getvalue()) |