<commit_before>package fields

import (
	. "launchpad.net/gocheck"
)

type CharFieldTestSuite struct{}

var _ = Suite(&CharFieldTestSuite{})

func (s *CharFieldTestSuite) TestCleanSuccess(c *C) {
	f := NewCharField("description")
	f.SetValue("Testing 1, 2, 3")

	c.Check(f.Clean(), Equals, nil)
	c.Check(f.CleanedValue(), Equals, "Testing 1, 2, 3")
}

func (s *CharFieldTestSuite) TestMinLength(c *C) {
	f := NewCharField("description")
	f.MinLength = 20
	f.SetValue("Testing 1, 2, 3")

	err := f.Clean()

	c.Check(err.Error(), Equals,
		"The value must have a minimum length of 20 characters.")
}
<commit_msg>Ensure tests for fields package are run.<commit_after>package fields

import (
	. "launchpad.net/gocheck"
	"testing"
)

// Hooks up gocheck into the gotest runner.
func Test(t *testing.T) { TestingT(t) }
type CharFieldTestSuite struct{}

var _ = Suite(&CharFieldTestSuite{})

func (s *CharFieldTestSuite) TestCleanSuccess(c *C) {
	f := NewCharField("description")
	f.SetValue("Testing 1, 2, 3")

	c.Check(f.Clean(), Equals, nil)
	c.Check(f.CleanedValue(), Equals, "Testing 1, 2, 3")
}

func (s *CharFieldTestSuite) TestMinLength(c *C) {
	f := NewCharField("description")
	f.MinLength = 20
	f.SetValue("Testing 1, 2, 3")

	err := f.Clean()

	c.Check(err.Error(), Equals,
		"The value must have a minimum length of 20 characters.")
}

{'fraction_non_alphanumeric': 0.15648286140089418, 'fraction_numerical': 0.019374068554396422, 'mean_word_length': 4.739316239316239, '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': '1640221', 'n_tokens_mistral': 529, 'n_tokens_neox': 490, 'n_words': 130}