Przeglądaj źródła

test: [WordFE] test call to model.transcribe()

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

+ 10
- 0
test/test_feature_extractors.py Wyświetl plik

@@ -451,3 +451,13 @@ class TestWordFeatureExtractor(unittest.TestCase):
test_extractor.teardown()

self.assertEqual(len(test_extractor.features), 3)

def test_transcribe(self):
"""Test _transcribe -- it calls model.transcribe"""
video_source = TestSourceMedia().one_colour_silent_audio()
test_extractor = extractors.WordFeatureExtractor(input_files=video_source)
mock_model = MagicMock()
test_extractor._transcribe(mock_model, "test.mp4")
mock_model.transcribe.assert_called_once()



Ładowanie…
Anuluj
Zapisz