Skip to content

Commit 45a7b30

Browse files
Tabrizianpcastonguay
authored andcommitted
Improve the check for disaggregated serving test
Signed-off-by: Iman Tabrizian <[email protected]>
1 parent 3805976 commit 45a7b30

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/integration/defs/disaggregated/test_disaggregated.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,23 @@ def run_disaggregated_test(example_dir,
223223
with open(output_file, 'r') as f:
224224
content = f.read()
225225
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+
]
227229
else:
228230
expected_strings = [
229231
"The capital of Germany is Berlin",
230232
"Asyncio is a Python library"
231233
]
232234
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}"
234243
for not_expected_string in not_expected_strings:
235244
assert not_expected_string not in content, f"Unexpected string '{not_expected_string}' found in {output_file}"
236245
except Exception:

0 commit comments

Comments
 (0)