File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
tests/integration/defs/disaggregated Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -223,14 +223,23 @@ def run_disaggregated_test(example_dir,
223
223
with open (output_file , 'r' ) as f :
224
224
content = f .read ()
225
225
if "deepseek_v3_lite" in test_desc or output_file == "output_chat.json" :
226
- expected_strings = ["Berlin" , "Asyncio is a" ]
226
+ expected_strings = [
227
+ "Berlin" , ["Asyncio is a" , "Asyncio module in" ]
228
+ ]
227
229
else :
228
230
expected_strings = [
229
231
"The capital of Germany is Berlin" ,
230
232
"Asyncio is a Python library"
231
233
]
232
234
for expected_string in expected_strings :
233
- assert expected_string in content , f"Expected string '{ expected_string } ' not found in { output_file } "
235
+ if isinstance (expected_string , list ):
236
+ # At least one of the strings in the list should be found in the content
237
+ assert any (
238
+ string in content
239
+ for string in expected_string
240
+ ), f"None of the strings in { expected_string } found in { output_file } "
241
+ else :
242
+ assert expected_string in content , f"Expected string '{ expected_string } ' not found in { output_file } "
234
243
for not_expected_string in not_expected_strings :
235
244
assert not_expected_string not in content , f"Unexpected string '{ not_expected_string } ' found in { output_file } "
236
245
except Exception :
You can’t perform that action at this time.
0 commit comments