Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

test(evaluate): Update unit tests

Christopher Tee0c14d38f1ff3
diff --git a/tests/evaluate/test_evaluate.py b/tests/evaluate/test_evaluate.py
index a0ba93331..faa50953d 100644
--- a/tests/evaluate/test_evaluate.py
+++ b/tests/evaluate/test_evaluate.py
@@ -112,11 +112,17 @@ def test_evaluate_call_bad():
assert score == 0.0
-def test_evaluate_display_table():
+ "display_table", [True, False, 1]
+)
+def test_evaluate_display_table(display_table):
devset = [new_example("What is 1+1?", "2")]
+ program = Predict("question -> answer")
ev = Evaluate(
devset=devset,
metric=answer_exact_match,
- display_table=True,
+ display_table=display_table,
)
- assert ev.display_table == True
+ assert ev.display_table == display_table
+
+ ev(program)