<commit_before>package task_test

import (
	"os"
	"testing"

	"github.com/synapse-garden/sg-proto/store"
	"github.com/synapse-garden/sg-proto/task"
	sgt "github.com/synapse-garden/sg-proto/testing"
	"github.com/synapse-garden/sg-proto/text"

	"github.com/boltdb/bolt"
	. "gopkg.in/check.v1"
)

type TaskSuite struct {
	*bolt.DB

	tmpDir string
}

var _ = Suite(&TaskSuite{})

func Test(t *testing.T) { TestingT(t) }

func (s *TaskSuite) SetUpTest(c *C) {
	db, tmpDir, err := sgt.TempDB("sg-stream-test")
	c.Assert(err, IsNil)
	c.Assert(db.Update(store.Wrap(
		store.Migrate(store.VerCurrent),
		store.SetupBuckets(task.TaskBucket),
		store.SetupBuckets(text.TextBucket),
	)), IsNil)
	s.DB, s.tmpDir = db, tmpDir
}

func (s *TaskSuite) TearDownTest(c *C) {<commit_msg>Update Task test harness<commit_after>package task_test

import (
	"os"
	"testing"

	"github.com/synapse-garden/sg-proto/store"
	"github.com/synapse-garden/sg-proto/task"
	sgt "github.com/synapse-garden/sg-proto/testing"
	"github.com/synapse-garden/sg-proto/text"
	"github.com/synapse-garden/sg-proto/users"

	"github.com/boltdb/bolt"
	. "gopkg.in/check.v1"
)

type TaskSuite struct {
	*bolt.DB

	tmpDir string
}

var _ = Suite(&TaskSuite{})

func Test(t *testing.T) { TestingT(t) }

func (s *TaskSuite) SetUpTest(c *C) {
	db, tmpDir, err := sgt.TempDB("sg-task-test")
	c.Assert(err, IsNil)
	c.Assert(db.Update(store.Wrap(
		store.Migrate(store.VerCurrent),
		store.SetupBuckets(
			users.UserBucket,
			task.TaskBucket,
			text.TextBucket,
		),
	)), IsNil)
	s.DB, s.tmpDir = db, tmpDir
}

func (s *TaskSuite) TearDownTest(c *C) {
{'fraction_non_alphanumeric': 0.16781465247338762, 'fraction_numerical': 0.0012523481527864746, 'mean_word_length': 4.222222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '310083', 'n_tokens_mistral': 711, 'n_tokens_neox': 682, 'n_words': 104}