lint: enable usetesting, disable tenv (#10594)

This commit is contained in:
Michael Yang 2025-05-08 11:42:14 -07:00 committed by GitHub
parent b585a58121
commit 6e9a7a2568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 55 additions and 87 deletions

View file

@ -2,7 +2,6 @@ package server
import (
"bytes"
"context"
"image"
"image/png"
"testing"
@ -318,7 +317,7 @@ func TestChatPrompt(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
model := tt.model
opts := api.Options{Runner: api.Runner{NumCtx: tt.limit}}
prompt, images, err := chatPrompt(context.TODO(), &model, mockRunner{}.Tokenize, &opts, tt.msgs, nil)
prompt, images, err := chatPrompt(t.Context(), &model, mockRunner{}.Tokenize, &opts, tt.msgs, nil)
if tt.error == nil && err != nil {
t.Fatal(err)
} else if tt.error != nil && err != tt.error {