<commit_before>package tar

import (
	"io/ioutil"
	"os"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestTarGzFile(t *testing.T) {
	var assert = assert.New(t)

	folder, err := ioutil.TempDir("", "targztest")
	assert.NoError(err)

	file, err := os.Create(folder + "/folder.tar.gz")
	assert.NoError(err)

	empty, err := os.Create(folder + "/empty.txt")
	assert.NoError(err)

	archive := New(file)
	assert.NoError(archive.Add("empty.txt", empty.Name()))
	assert.Error(archive.Add("dont.txt", empty.Name()+"_nope"))
	assert.NoError(archive.Close())
}
<commit_msg>added more tar tests<commit_after>package tar

import (
	"io/ioutil"
	"os"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestTarGzFile(t *testing.T) {
	var assert = assert.New(t)

	folder, err := ioutil.TempDir("", "targztest")
	assert.NoError(err)

	file, err := os.Create(folder + "/folder.tar.gz")
	assert.NoError(err)

	empty, err := os.Create(folder + "/empty.txt")
	assert.NoError(err)

	empty2, err := os.Create(folder + "/empty2.txt")
	assert.NoError(err)

	archive := New(file)
	assert.NoError(archive.Add("empty.txt", empty.Name()))
	assert.Error(archive.Add("dont.txt", empty.Name()+"_nope"))
	assert.NoError(archive.Close())
	assert.Error(archive.Add("empty2.txt", empty2.Name()))
}

{'fraction_non_alphanumeric': 0.1931196247068022, 'fraction_numerical': 0.003127443315089914, 'mean_word_length': 4.8986175115207375, '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': '5607286', 'n_tokens_mistral': 515, 'n_tokens_neox': 505, 'n_words': 80}