<commit_before>package util

import (
	"testing"
)

var SOME_DEFAULT = "kdfnsdlkfj23523sdgdfh"

func TestGetenvExist(t *testing.T) {
	res := Getenv("OS", SOME_DEFAULT)

	if res == "" {
		t.Error("Existing env var exist, should not return empty string")
	}
	if res == SOME_DEFAULT {
		t.Error("Existing env var exist, should not return the default")
	}
}

func TestGetenvNotExistExpectDefault(t *testing.T) {
	res := Getenv(SOME_DEFAULT, SOME_DEFAULT)

	if res == "" {
		t.Error("var does not exist, should return default")
	}
	if res != SOME_DEFAULT {
		t.Error("var does not exist, should return default")
	}
}

func TestGetenvNoDefault(t *testing.T) {
	res := GetenvNoDefault("OS")

	if res == "" {
		t.Error("Existing env var exist, should not return empty string")
	}
}

func TestGetenvNoDefaultWithNotExistingEnv(t *testing.T) {
	res := GetenvNoDefault(SOME_DEFAULT)

	if res != "" {
		t.Error("Env var does not exist, should return empty string")
	}
}<commit_msg>fix bug in test<commit_after>package util

import (
	"testing"
	"os"
)

var SOME_DEFAULT = "kdfnsdlkfj23523sdgdfh"
var dummyEnv = "SOME_DUMMY"
var SOME_VAL = "aaasas"

func TestGetenvExist(t *testing.T) {
	os.Setenv(dummyEnv, SOME_VAL)
	res := Getenv(dummyEnv, SOME_DEFAULT)

	if res == "" {
		t.Error("Existing env var exist, should not return empty string")
	}
	if res == SOME_DEFAULT {
		t.Error("Existing env var exist, should not return the default")
	}
}

func TestGetenvNotExistExpectDefault(t *testing.T) {
	res := Getenv(SOME_DEFAULT, SOME_DEFAULT)

	if res == "" {
		t.Error("var does not exist, should return default")
	}
	if res != SOME_DEFAULT {
		t.Error("var does not exist, should return default")
	}
}

func TestGetenvNoDefault(t *testing.T) {
	os.Setenv(dummyEnv, SOME_VAL)
	res := GetenvNoDefault(dummyEnv)

	if res == "" {
		t.Error("Existing env var exist, should not return empty string")
	}
}

func TestGetenvNoDefaultWithNotExistingEnv(t *testing.T) {
	res := GetenvNoDefault(SOME_DEFAULT)

	if res != "" {
		t.Error("Env var does not exist, should return empty string")
	}
}
{'fraction_non_alphanumeric': 0.12572533849129594, 'fraction_numerical': 0.004835589941972921, 'mean_word_length': 4.473544973544974, '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': '7419587', 'n_tokens_mistral': 786, 'n_tokens_neox': 745, 'n_words': 200}