Skip to content

Commit c94106c

Browse files
committed
added a sample video for test cases to avoid file-not-found problem
1 parent 8bd9c25 commit c94106c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/black-2997fps.mp4

63.1 KB
Binary file not shown.

tests/test_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pathlib
12
import unittest
23

34
import pytest
@@ -31,7 +32,7 @@ def setUp(self):
3132
"properties": {
3233
"mime": "video",
3334
"id": "d1",
34-
"location": "file:///home/snewman/Documents/test_vid.mp4"
35+
"location": f"file://{pathlib.Path(__file__).parent}/black-2997fps.mp4"
3536
}
3637
})
3738
self.video_doc.add_property('fps', self.fps)
@@ -105,7 +106,7 @@ def test_convert_timeframe(self):
105106
for times in zip((3.337, 6.674), vdh.convert_timeframe(self.mmif_obj, timeframe_ann, 's')):
106107
self.assertAlmostEqual(*times, places=0)
107108

108-
def test_extract_frams_as_images(self):
109+
def test_extract_frames_as_images(self):
109110
frame_list = [5, 10, 15]
110111
target_images = vdh.extract_frames_as_images(self.video_doc, frame_list, as_PIL=False)
111112
self.assertEqual(3, len(target_images))

0 commit comments

Comments
 (0)