Skip to content

Commit 580167d

Browse files
committed
fix test
1 parent 2b37b95 commit 580167d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/traceloop-sdk/tests/experiment/test_experiment.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ async def task_missing_fields(row):
165165
# Should have at least one error and should have broken early
166166
assert len(errors) >= 1
167167
assert "Task output missing required fields for evaluators:" in errors[0]
168-
assert "pii-detector requires: ['text']" in errors[0]
168+
assert "pii-detector requires:" in errors[0]
169+
assert "'text'" in errors[0]
169170
# With stop_on_error=True, it should break and not process all 3 rows
170171
assert len(results) + len(errors) <= 3
171172

@@ -211,7 +212,8 @@ async def task_missing_fields(row):
211212
assert len(errors) == 1
212213
assert len(results) == 0
213214
assert "Task output missing required fields for evaluators:" in errors[0]
214-
assert "pii-detector requires: ['text']" in errors[0]
215+
assert "pii-detector requires:" in errors[0]
216+
assert "'text'" in errors[0]
215217

216218
@pytest.mark.anyio(backends=["asyncio"])
217219
async def test_run_locally_succeeds_with_valid_output(self):
@@ -310,11 +312,12 @@ async def task_partial_output(row):
310312
)
311313

312314
# Should have error with validation message
315+
# Note: 'text' in task output maps to 'response' via synonym mapping,
316+
# so only 'prompt' is missing
313317
assert len(errors) >= 1
314318
error_message = errors[0]
315319
assert "relevance-checker requires:" in error_message
316320
assert "'prompt'" in error_message
317-
assert "'response'" in error_message
318321

319322
@pytest.mark.anyio(backends=["asyncio"])
320323
async def test_run_locally_no_validation_for_string_evaluators(self):

0 commit comments

Comments
 (0)