From 03009ff130c26735ba368415b60679058b6e2793 Mon Sep 17 00:00:00 2001 From: Kevin Maik Jablonka Date: Tue, 26 Sep 2023 14:20:49 +0200 Subject: [PATCH] more tests --- tests/icl/test_fewshotpredictor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/icl/test_fewshotpredictor.py b/tests/icl/test_fewshotpredictor.py index 97e41ad..16f63d7 100644 --- a/tests/icl/test_fewshotpredictor.py +++ b/tests/icl/test_fewshotpredictor.py @@ -32,3 +32,11 @@ def test_fewshotpredictor(get_llm): assert predictor._support_set is not None x, y = predictor._support_set assert len(x) == 5 == len(y) + formatted = predictor._format_examples(x, y) + assert isinstance(formatted, str) + assert formatted.startswith("-") + parts = formatted.split("\n") + assert len(parts) == 5 + for part in parts: + assert "-" in part + assert ":" in part