Browse Source

test: VAFE _keep_num test

main
Rob Hallam 1 month ago
parent
commit
e7a9bae601
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      test/test_feature_extractors.py

+ 13
- 1
test/test_feature_extractors.py View File

@@ -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"""


Loading…
Cancel
Save