2023-04-03 11:19:35 -05:00
|
|
|
"""Test image converter with identical basenames"""
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.sphinx('latex', testroot='ext-imgmockconverter')
|
2024-07-23 09:35:55 -05:00
|
|
|
def test_ext_imgmockconverter(app):
|
2024-01-16 20:38:46 -06:00
|
|
|
app.build(force_all=True)
|
2023-04-03 11:19:35 -05:00
|
|
|
|
2024-07-10 15:43:14 -05:00
|
|
|
content = (app.outdir / 'projectnamenotset.tex').read_text(encoding='utf8')
|
2023-04-03 11:19:35 -05:00
|
|
|
|
|
|
|
# check identical basenames give distinct files
|
|
|
|
assert '\\sphinxincludegraphics{{svgimg}.pdf}' in content
|
|
|
|
assert '\\sphinxincludegraphics{{svgimg1}.pdf}' in content
|
|
|
|
assert not (app.outdir / 'svgimg.svg').exists()
|
|
|
|
assert (app.outdir / 'svgimg.pdf').exists()
|
|
|
|
assert (app.outdir / 'svgimg1.pdf').exists()
|