1"""
2    test_ext_imgconverter
3    ~~~~~~~~~~~~~~~~~~~~~
4
5    Test sphinx.ext.imgconverter extension.
6
7    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
8    :license: BSD, see LICENSE for details.
9"""
10
11import os
12
13import pytest
14
15
16@pytest.mark.sphinx('latex', testroot='ext-imgconverter')
17@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
18def test_ext_imgconverter(app, status, warning):
19    app.builder.build_all()
20
21    content = (app.outdir / 'python.tex').read_text()
22    assert '\\sphinxincludegraphics{{svgimg}.png}' in content
23    assert not (app.outdir / 'svgimg.svg').exists()
24    assert (app.outdir / 'svgimg.png').exists()
25