Skip to content

Commit 6c81cb8

Browse files
Robert FitzpatrickRobert Fitzpatrick
authored andcommitted
Fix tests to match enhanced multimodal capabilities
- Update test expectations for gpt-4o to include audio support - Modify supported_modalities test to expect 3 modalities (text, image, audio) - Update exact_combination_matching to test all valid combinations - All 9 tests now pass with enhanced multimodal detection The tests now correctly reflect that gpt-4o supports both image AND audio capabilities, matching our enhanced runtime testing implementation.
1 parent 955e5b9 commit 6c81cb8

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

tests/unit/prompt_target/test_modality_support.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@ def test_supported_modalities_properties():
172172
openai_target.model_name = "gpt-4o" # Use multimodal model
173173
text_target = MockTextTarget()
174174

175-
# OpenAI with gpt-4o should return text and image_path
175+
# OpenAI with gpt-4o should return text, image_path, and audio_path
176176
openai_input_modalities = openai_target.supported_input_modalities
177177
assert "text" in openai_input_modalities
178178
assert "image_path" in openai_input_modalities
179-
assert len(openai_input_modalities) == 2
179+
assert "audio_path" in openai_input_modalities
180+
assert len(openai_input_modalities) == 3 # text, image_path, audio_path
180181

181182
# Text target should return only text
182183
text_input_modalities = text_target.supported_input_modalities
@@ -235,13 +236,16 @@ def test_openai_model_specific_capabilities():
235236
def test_exact_combination_matching():
236237
"""Test that modality support requires exact combination matching."""
237238
target = MockOpenAITarget()
238-
target.model_name = "gpt-4o" # Use multimodal model
239+
target.model_name = "gpt-4o" # Use multimodal model with image+audio support
239240

240-
# Supported combinations: {text} and {text, image_path}
241+
# Supported combinations for gpt-4o: text, text+image, text+audio, text+image+audio
241242
assert target.input_modality_supported({"text"})
242243
assert target.input_modality_supported({"text", "image_path"})
244+
assert target.input_modality_supported({"text", "audio_path"})
245+
assert target.input_modality_supported({"text", "image_path", "audio_path"})
243246

244-
# Unsupported combinations
247+
# Unsupported combinations (missing text or only single modality)
245248
assert not target.input_modality_supported({"image_path"}) # image only
246-
assert not target.input_modality_supported({"text", "audio_path"}) # text+audio
247-
assert not target.input_modality_supported({"text", "image_path", "audio_path"}) # text+image+audio
249+
assert not target.input_modality_supported({"audio_path"}) # audio only
250+
assert not target.input_modality_supported({"image_path", "audio_path"}) # image+audio without text
251+
assert not target.input_modality_supported({"text", "video_path"}) # unsupported modality

0 commit comments

Comments
 (0)