<commit_before>package main

import (
	"github.com/op/go-logging"
	"testing"
)

type SilentWriter struct {
}

func (w SilentWriter) Write(p []byte) (n int, err error) {
	return 0, nil
}

func TestNothing(t *testing.T) {

}

func BenchmarkSetup(b *testing.B) {
	logBackend := logging.NewLogBackend(SilentWriter{}, "", 0)
	stats = MakeStatsCollector()
	setupConfig()
	setupLog(logBackend)
	setupCache()
}<commit_msg>Add some tests<commit_after>package main

import (
	"github.com/op/go-logging"
	. "github.com/smartystreets/goconvey/convey"
	"testing"
)

type SilentWriter struct {
}

func (w SilentWriter) Write(p []byte) (n int, err error) {
	return 0, nil
}

func TestSetup(t *testing.T) {
	logBackend := logging.NewLogBackend(SilentWriter{}, "", 0)
	stats = MakeStatsCollector()
	setupConfig()
	setupLog(logBackend)
	setupCache()
}

func TestRenders(t *testing.T) {
	Convey("GetHead should return valid a image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetHead(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetHelm should return valid a image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetHelm(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetCube should return valid a image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetCube(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetBust should return valid a image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetBust(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetBody should return valida  image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetBody(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetArmorBust should return a valid image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetArmorBust(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})

	Convey("GetArmorBody should return a valid image", t, func() {
		skin := fetchSkin("clone1018")
		err := skin.GetArmorBody(20)

		So(skin.Processed, ShouldNotBeNil)
		So(err, ShouldBeNil)
	})
}

func BenchmarkSetup(b *testing.B) {
	logBackend := logging.NewLogBackend(SilentWriter{}, "", 0)
	stats = MakeStatsCollector()
	setupConfig()
	setupLog(logBackend)
	setupCache()
}
{'fraction_non_alphanumeric': 0.14728353140916808, 'fraction_numerical': 0.019949066213921902, 'mean_word_length': 4.8197530864197535, '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': '4348656', 'n_tokens_mistral': 949, 'n_tokens_neox': 887, 'n_words': 193}