Przeglądaj źródła

test: VAFE _keep_num test

main
Rob Hallam 2 miesięcy temu
rodzic
commit
e7a9bae601
1 zmienionych plików z 13 dodań i 1 usunięć
  1. +13
    -1
      test/test_feature_extractors.py

+ 13
- 1
test/test_feature_extractors.py Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz