Files
sphinx/tests/test_ext_imgconverter.py

25 lines
689 B
Python
Raw Normal View History

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