summaryrefslogtreecommitdiff
path: root/tests/test_build_latex.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r--tests/test_build_latex.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
index f20fc67c5..3f1206ac8 100644
--- a/tests/test_build_latex.py
+++ b/tests/test_build_latex.py
@@ -4,6 +4,7 @@ import os
import re
import subprocess
from itertools import product
+from pathlib import Path
from shutil import copyfile
from subprocess import CalledProcessError
@@ -1670,3 +1671,25 @@ def test_latex_code_role(app):
common_content + '%\n}} code block') in content
assert (r'\begin{sphinxVerbatim}[commandchars=\\\{\}]' +
'\n' + common_content + '\n' + r'\end{sphinxVerbatim}') in content
+
+
+@pytest.mark.sphinx('latex', testroot='images')
+def test_copy_images(app, status, warning):
+ app.build()
+
+ test_dir = Path(app.outdir)
+ images = {
+ image.name for image in test_dir.rglob('*')
+ if image.suffix in {'.gif', '.pdf', '.png', '.svg'}
+ }
+ assert images == {
+ 'img.gif',
+ 'img.pdf',
+ 'img.png',
+ 'python-logo.png',
+ 'rimg.png',
+ 'rimg1.png',
+ 'svgimg.pdf',
+ 'svgimg.svg',
+ 'testimäge.png',
+ }