Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardopinosio committed Mar 21, 2024
1 parent e39c981 commit 1181ba6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"log"
"os"
"path"
"testing"
Expand All @@ -21,8 +22,18 @@ var textClassificationData []byte
var tokenClassificationData []byte

func TestMain(m *testing.M) {
entries, err := os.ReadDir("../models")
if err != nil {
log.Fatal(err)
}

for _, e := range entries {
fmt.Println(e.Name())
}

// model setup
if ok, err := util.FileSystem.Exists(context.Background(), "../models"); err == nil {
fmt.Println("HERE")
if !ok {
session, err := hugot.NewSession()
if err != nil {
Expand Down Expand Up @@ -81,6 +92,7 @@ func TestTextClassificationCli(t *testing.T) {

args := append(baseArgs, "run", fmt.Sprintf("--input=%s", testDataDir), fmt.Sprintf("--model=%s", testModel), "--type=textClassification")
if err := app.Run(args); err != nil {
fmt.Println("ERROR HERE")
check(t, err)
}
}
Expand Down

0 comments on commit 1181ba6

Please sign in to comment.