<commit_before>package is

import (
	"fmt"
	"log"
	"reflect"
	"testing"
)

// Is provides methods that leverage the existing testing capabilities found
// in the Go test framework. The methods provided allow for a more natural,
// efficient and expressive approach to writing tests. The goal is to write
// fewer lines of code while improving communication of intent.
type Is struct {
	TB         testing.TB
	strict     bool
	failFormat string
	failArgs   []interface{}
}

// New creates a new instance of the Is object and stores a reference to the
// provided testing object.
func New(tb testing.TB) *Is {
	if tb == nil {
		log.Fatalln("You must provide a testing object.")
	}
	return &Is{TB: tb, strict: true}
}

// Msg defines a message to print in the event of a failure. This allows you
// to print out additional information about a failure if it happens.<commit_msg>Add New() method to Is instance.<commit_after>package is

import (
	"fmt"
	"log"
	"reflect"
	"testing"
)

// Is provides methods that leverage the existing testing capabilities found
// in the Go test framework. The methods provided allow for a more natural,
// efficient and expressive approach to writing tests. The goal is to write
// fewer lines of code while improving communication of intent.
type Is struct {
	TB         testing.TB
	strict     bool
	failFormat string
	failArgs   []interface{}
}

// New creates a new instance of the Is object and stores a reference to the
// provided testing object.
func New(tb testing.TB) *Is {
	if tb == nil {
		log.Fatalln("You must provide a testing object.")
	}
	return &Is{TB: tb, strict: true}
}

// New creates a new copy of your Is object and replaces the internal testing
// object with the provided testing object. This is useful for re-initializing
// your `is` instance inside a subtest so that it doesn't panic when using
// Strict mode.
//
// For example, creating your initial instance as such
//  is := is.New(t)
// is the convention, but this obviously shadows the `is` package namespace.
// Inside your subtest, you can do the exact same thing to initialize a locally scoped
// variable that uses the subtest's testing.T object.
func (is *Is) New(tb testing.TB) *Is {
	return &Is{
		TB:         tb,
		strict:     is.strict,
		failFormat: is.failFormat,
		failArgs:   is.failArgs,
	}
}

// Msg defines a message to print in the event of a failure. This allows you
// to print out additional information about a failure if it happens.
{'fraction_non_alphanumeric': 0.07941653160453808, 'fraction_numerical': 0.0, 'mean_word_length': 3.3239929947460594, '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': '2411734', 'n_tokens_mistral': 698, 'n_tokens_neox': 676, 'n_words': 351}