sphinx/tests/test_ext_imgconverter.py

25 lines
689 B
Python
Raw Normal View History

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.
"""
import pytest
import os
2017-03-06 23:10:23 -06:00
@pytest.mark.sphinx('latex', testroot='ext-imgconverter')
@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()