소스 검색

test: add LAFE - no input files & test_extract()

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

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

@@ -67,3 +67,17 @@ class TestLoudAudioFeatureExtractor(unittest.TestCase):
test_extractor = extractors.LoudAudioFeatureExtractor(input_files=video_source)
self.assertTrue(test_extractor)

def test_init_noinput(self):
"""test init - no input files"""
with self.assertRaises(ValueError):
test_extractor = extractors.LoudAudioFeatureExtractor()

def test_extract(self):
"""Test extract with input files"""
video_source = TestSourceMedia().one_colour_silent_audio()
test_extractor = extractors.LoudAudioFeatureExtractor(input_files=video_source)
test_extractor.setup()
test_extractor.run()
test_extractor.teardown()
self.assertEqual(test_extractor.features, [])


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