|
|
@@ -310,7 +310,19 @@ class TestVideoActivityFeatureExtractor(unittest.TestCase): |
|
|
|
test_extractor.teardown() |
|
|
|
self.assertTrue(test_extractor.features) |
|
|
|
|
|
|
|
# TODO: add sample video with activity to test _activitydetect() |
|
|
|
def test_keep_num(self): |
|
|
|
"""Test keep_num keeps 0""" |
|
|
|
num_features = 1 |
|
|
|
min_duration = 0 |
|
|
|
|
|
|
|
video_source = TestSourceMedia().one_colour_silent_audio() |
|
|
|
test_extractor = extractors.VideoActivityFeatureExtractor(input_files=video_source, |
|
|
|
num_features=num_features, |
|
|
|
min_duration=min_duration) |
|
|
|
test_extractor.setup() |
|
|
|
test_extractor.run() |
|
|
|
test_extractor.teardown() |
|
|
|
self.assertEqual(len(test_extractor.features), num_features) |
|
|
|
|
|
|
|
class TestJSONFeatureExtractor(unittest.TestCase): |
|
|
|
"""Test JSONFeatureExtractor""" |
|
|
|