Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardopinosio committed Mar 21, 2024
1 parent 531a037 commit bb77090
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import (
var textClassificationData []byte

//go:embed testData/tokenClassification.jsonl
var tokenClassificationData []byte
// var tokenClassificationData []byte

func TestMain(m *testing.M) {
// model setup
if ok, err := util.FileSystem.Exists(context.Background(), "/build/models"); err == nil {
fmt.Println("HERE")
fmt.Println("HERE NO ERROR")
if !ok {
fmt.Println("HERE MODEL FOLDER NOT THERE")
session, err := hugot.NewSession()
if err != nil {
panic(err)
Expand Down Expand Up @@ -91,7 +92,7 @@ func TestTextClassificationCli(t *testing.T) {
// write the test data and test recursive reads and processing from folder
testDataDir := path.Join(os.TempDir(), "hugoTestData")
recurseDir := path.Join(testDataDir, "cliRecurseTest")
err := os.MkdirAll(recurseDir, os.ModePerm)
err = os.MkdirAll(recurseDir, os.ModePerm)
check(t, err)
err = os.WriteFile(path.Join(testDataDir, "test-0.jsonl"), textClassificationData, os.ModePerm)
check(t, err)
Expand Down

0 comments on commit bb77090

Please sign in to comment.