Skip to content

Commit f6175cd

Browse files
committed
fix failing unit tests
Signed-off-by: Mark Kurtz <[email protected]>
1 parent 9f2eb86 commit f6175cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/unit/data/deserializers/test_synthetic.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,17 @@ def test_create_prompt_method(self, simple_config, mock_tokenizer):
310310
faker = Faker()
311311
faker.seed_instance(42)
312312

313+
# Access the _create_prompt method through the examples iterable
314+
ex_iterable = generator._ex_iterable
315+
313316
# Test normal case
314-
result = generator._create_prompt(5, faker, "unique_prefix ")
317+
result = ex_iterable._create_prompt(5, faker, "unique_prefix ")
315318
assert isinstance(result, str)
316319
# The result should be the decoded tokens (token_0 token_1 etc.) due to our mock
317320
assert "token_" in result
318321

319322
# Test zero tokens
320-
result = generator._create_prompt(0, faker)
323+
result = ex_iterable._create_prompt(0, faker)
321324
assert result == ""
322325

323326
@pytest.mark.regression

0 commit comments

Comments
 (0)