<commit_before>package minquery

import (
	"encoding/hex"
	"log"
	"testing"

	mgo "gopkg.in/mgo.v2"
	"gopkg.in/mgo.v2/bson"

	"github.com/icza/mighty"
)

var sess *mgo.Session

func init() {
	var err error
	sess, err = mgo.Dial("mongodb://localhost/minquery")
	if err != nil {
		panic(err)
	}

	// Check required min version (3.2)
	bi, err := sess.BuildInfo()
	if err != nil {
		panic(err)
	}
	if !bi.VersionAtLeast(3, 2) {
		log.Panicf("This test requires at least MongoDB 3.2, got only %v", bi.Version)<commit_msg>Removed db to use the default one in tests.<commit_after>package minquery

import (
	"encoding/hex"
	"log"
	"testing"

	mgo "gopkg.in/mgo.v2"
	"gopkg.in/mgo.v2/bson"

	"github.com/icza/mighty"
)

var sess *mgo.Session

func init() {
	var err error
	sess, err = mgo.Dial("")
	if err != nil {
		panic(err)
	}

	// Check required min version (3.2)
	bi, err := sess.BuildInfo()
	if err != nil {
		panic(err)
	}
	if !bi.VersionAtLeast(3, 2) {
		log.Panicf("This test requires at least MongoDB 3.2, got only %v", bi.Version)
{'fraction_non_alphanumeric': 0.1576402321083172, 'fraction_numerical': 0.015473887814313346, 'mean_word_length': 3.404255319148936, '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': '1019159', 'n_tokens_mistral': 472, 'n_tokens_neox': 443, 'n_words': 109}