From c8d414565d50f1118ebf774fba2f6f397c607f2c Mon Sep 17 00:00:00 2001 From: Rob Hallam <0504004h@student.gla.ac.uk> Date: Mon, 16 Sep 2024 02:07:13 +0100 Subject: [PATCH] test: [WordFE] test call to model.transcribe() --- test/test_feature_extractors.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_feature_extractors.py b/test/test_feature_extractors.py index 5286a31..3fba4aa 100644 --- a/test/test_feature_extractors.py +++ b/test/test_feature_extractors.py @@ -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() + +