Read path is cgo like search. Control questions live in rank so CI can
test them without ladybug. Python bin/kb/{get,stats,eval} stays the
runner fallback.
18 lines
390 B
Go
18 lines
390 B
Go
package rank
|
|
|
|
import "testing"
|
|
|
|
func TestEvalQuestionsAreThreeAndThreshold(t *testing.T) {
|
|
if EvalRecallThreshold != 0.95 {
|
|
t.Fatalf("threshold = %v", EvalRecallThreshold)
|
|
}
|
|
if len(EvalQuestions) != 3 {
|
|
t.Fatalf("questions = %d, want 3", len(EvalQuestions))
|
|
}
|
|
for _, q := range EvalQuestions {
|
|
if q.Query == "" || q.Fragment == "" {
|
|
t.Fatalf("empty control: %+v", q)
|
|
}
|
|
}
|
|
}
|