Procházet zdrojové kódy

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

main
Rob Hallam před 2 měsíci
rodič
revize
d38d5e619f
1 změnil soubory, kde provedl 14 přidání a 0 odebrání
  1. +14
    -0
      test/test_feature_extractors.py

+ 14
- 0
test/test_feature_extractors.py Zobrazit soubor

@@ -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, [])


Načítá se…
Zrušit
Uložit