<commit_before>// chris 080615

package main

import (
	"os"
	"path"
	"testing"
)

func testProcess(t *testing.T, srcname, dstname string) {
	src, err := os.Open(srcname)
	if err != nil {
		t.Error(err)
	}
	defer src.Close()
	flag := os.O_WRONLY | os.O_CREATE | os.O_TRUNC
	dst, err := os.OpenFile(dstname, flag, 0666)
	if err != nil {
		t.Error(err)
	}
	defer dst.Close()
	err = process(dst, srcname, src)
	if err != nil {
		t.Error(err)
	}
}

func TestProcess(t *testing.T) {
	srcname := path.Join("test", "comp.v")
	dstname := path.Join("test", "comp.go")
	testProcess(t, srcname, dstname)
	os.Remove(dstname)
}
<commit_msg>Improves the robustness of the process test.<commit_after>// chris 080615

package main

import (
	"os"
	"path"
	"testing"
)

func testProcess(t *testing.T, srcname, dstname string) {
	src, err := os.Open(srcname)
	if err != nil {
		t.Error(err)
	}
	defer src.Close()
	flag := os.O_WRONLY | os.O_CREATE | os.O_TRUNC
	dst, err := os.OpenFile(dstname, flag, 0666)
	if err != nil {
		t.Error(err)
	}
	defer dst.Close()
	err = process(dst, srcname, src)
	if err != nil {
		t.Error(err)
	}
}

func TestProcess(t *testing.T) {
	srcname := path.Join("test", "comp.v")
	dstname := path.Join("test", "comp.go")
	testProcess(t, srcname, dstname)
	defer os.Remove(dstname)
}

{'fraction_non_alphanumeric': 0.16963594113090627, 'fraction_numerical': 0.015491866769945779, 'mean_word_length': 3.7675276752767526, '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': '7171632', 'n_tokens_mistral': 567, 'n_tokens_neox': 543, 'n_words': 127}