Skip to content

Commit

Permalink
test(videoConverter): add video converter exiftool test
Browse files Browse the repository at this point in the history
  • Loading branch information
absadiki committed Dec 23, 2024
1 parent 75aed53 commit aa4a073
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file added tests/test_files/test.mp4
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/test_markitdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
"5bda1dd6",
]

VIDEO_TEST_EXIFTOOL = {
"Title": "Sample video test for MarkItDown",
"Comment": "This is a sample video created using FFmpeg, with the voice-over generated by the Parler-TTS model.",
"ImageSize": "1280x720",
}


# --- Helper Functions ---
def validate_strings(result, expected_strings, exclude_strings=None):
Expand Down Expand Up @@ -246,6 +252,14 @@ def test_markitdown_exiftool() -> None:
target = f"{key}: {JPG_TEST_EXIFTOOL[key]}"
assert target in result.text_content

# Test Video metadata
result = markitdown.convert(
os.path.join(TEST_FILES_DIR, "test.mp4"), transcribe=False, llm_summary=False
)
for key in VIDEO_TEST_EXIFTOOL:
target = f"{key}: {VIDEO_TEST_EXIFTOOL[key]}"
assert target in result.text_content


def test_markitdown_deprecation() -> None:
try:
Expand Down

0 comments on commit aa4a073

Please sign in to comment.