2017-03-06 23:10:23 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
test_ext_imgconverter
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Test sphinx.ext.imgconverter extension.
|
|
|
|
|
2017-12-31 10:06:58 -06:00
|
|
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
2017-03-06 23:10:23 -06:00
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
|
|
|
|
2017-06-14 13:26:15 -05:00
|
|
|
import os
|
2017-03-06 23:10:23 -06:00
|
|
|
|
2018-02-19 07:39:14 -06:00
|
|
|
import pytest
|
|
|
|
|
2017-03-06 23:10:23 -06:00
|
|
|
|
|
|
|
@pytest.mark.sphinx('latex', testroot='ext-imgconverter')
|
2017-06-14 13:26:15 -05:00
|
|
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
2017-03-06 23:10:23 -06:00
|
|
|
def test_ext_imgconverter(app, status, warning):
|
|
|
|
app.builder.build_all()
|
|
|
|
|
|
|
|
content = (app.outdir / 'Python.tex').text()
|
2017-04-23 03:59:39 -05:00
|
|
|
assert '\\sphinxincludegraphics{{svgimg}.png}' in content
|
2017-03-06 23:10:23 -06:00
|
|
|
assert not (app.outdir / 'svgimg.svg').exists()
|
|
|
|
assert (app.outdir / 'svgimg.png').exists()
|