Fix exiftool in well-known paths. (#1106)

This commit is contained in:
afourney
2025-03-07 21:47:20 -08:00
committed by GitHub
parent 515fa854bf
commit 99d8e562db
3 changed files with 27 additions and 30 deletions

View File

@@ -7,8 +7,6 @@ import openai
import pytest
import requests
import warnings
from markitdown import (
MarkItDown,
UnsupportedFormatException,
@@ -517,19 +515,6 @@ def test_exceptions() -> None:
reason="do not run if exiftool is not installed",
)
def test_markitdown_exiftool() -> None:
# Test the automatic discovery of exiftool throws a warning
# and is disabled
try:
warnings.simplefilter("default")
with warnings.catch_warnings(record=True) as w:
markitdown = MarkItDown()
result = markitdown.convert(os.path.join(TEST_FILES_DIR, "test.jpg"))
assert len(w) == 1
assert w[0].category is DeprecationWarning
assert result.text_content.strip() == ""
finally:
warnings.resetwarnings()
which_exiftool = shutil.which("exiftool")
assert which_exiftool is not None