mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 14:40:22 -05:00
Disallow untyped defs in `tests/test_util/test_util_images.py` (#13543)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
1 parent
ad85bf8a4d
commit
5a73bf6af0
2 files changed
+5
-2
No files matched your search
@@ -290,7 +290,6 @@ module = [
|
||||
"tests.test_util.test_util",
|
||||
"tests.test_util.test_util_display",
|
||||
"tests.test_util.test_util_docutils",
|
||||
"tests.test_util.test_util_images",
|
||||
"tests.test_util.test_util_inventory",
|
||||
# tests/test_writers
|
||||
"tests.test_writers.test_docutilsconf",
|
||||
|
||||
@@ -11,13 +11,17 @@ from sphinx.util.images import (
|
||||
parse_data_uri,
|
||||
)
|
||||
|
||||
TYPE_CHECKING = False
|
||||
if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
GIF_FILENAME = 'img.gif'
|
||||
PNG_FILENAME = 'img.png'
|
||||
PDF_FILENAME = 'img.pdf'
|
||||
TXT_FILENAME = 'index.txt'
|
||||
|
||||
|
||||
def test_get_image_size(rootdir):
|
||||
def test_get_image_size(rootdir: Path) -> None:
|
||||
assert get_image_size(rootdir / 'test-root' / GIF_FILENAME) == (200, 181)
|
||||
assert get_image_size(rootdir / 'test-root' / PNG_FILENAME) == (200, 181)
|
||||
assert get_image_size(rootdir / 'test-root' / PDF_FILENAME) is None
|
||||
|
||||
Reference in new issue
Block a user