소스 검색

test: [LoudFE._keep_min] test min duration

main
Rob Hallam 2 달 전
부모
커밋
a6bd196e39
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. +13
    -0
      test/test_feature_extractors.py

+ 13
- 0
test/test_feature_extractors.py 파일 보기

@@ -252,6 +252,19 @@ class TestLoudAudioFeatureExtractor(unittest.TestCase):
test_extractor.teardown()
self.assertEqual(len(test_extractor.features), 10)

# test with min_duration
min_duration = 100
with self.subTest("min_duration"):
test_extractor = extractors.LoudAudioFeatureExtractor(input_files=video_source,
min_duration=min_duration,
num_features=10)
test_extractor._get_loudnesses = self._mock_get_loudnessess
test_extractor.setup()
test_extractor.run()
test_extractor.teardown()
for feature in test_extractor.features:
self.assertGreaterEqual(feature.interval.duration, min_duration)

# TODO: add sample video with loud audio to test _loudnessdetect()

class TestVideoActivityFeatureExtractor(unittest.TestCase):


불러오는 중...
취소
저장