<commit_before>package utils

import (
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"testing"
)

func TestHTTPCache(t *testing.T) {
	var dir = filepath.Join("/Volumes/RamDisk/tmp/.gogrs", fmt.Sprintf("%d", RandInt()))

	t.Log("TempDir: ", dir)
	hc := NewHTTPCache(dir, "utf8")
	t.Log("TempDir: ", hc.Dir)
	defer os.RemoveAll(hc.Dir)
	hc.Get("http://toomore.net/?q=%d", true)<commit_msg>Fixed tempfile_test bug.<commit_after>package utils

import (
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"testing"
)

func TestHTTPCache(t *testing.T) {
	var dir = filepath.Join("/Volumes/RamDisk/tmp/.gogrs", fmt.Sprintf("%d", RandInt()))

	t.Log("TempDir: ", dir)
	hc := NewHTTPCache(dir, "utf8")
	t.Log("TempDir: ", hc.Dir)
	defer os.RemoveAll(filepath.Join(hc.Dir, TempFolderName))
	hc.Get("http://toomore.net/?q=%d", true)
{'fraction_non_alphanumeric': 0.21163366336633663, 'fraction_numerical': 0.0024752475247524753, 'mean_word_length': 4.7785714285714285, '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': '2722511', 'n_tokens_mistral': 357, 'n_tokens_neox': 349, 'n_words': 56}