Parcourir la source

test: VAFE _keep_num test

main
Rob Hallam il y a 2 mois
Parent
révision
e7a9bae601
1 fichiers modifiés avec 13 ajouts et 1 suppressions
  1. +13
    -1
      test/test_feature_extractors.py

+ 13
- 1
test/test_feature_extractors.py Voir le fichier

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


Chargement…
Annuler
Enregistrer