<commit_before>package imagick

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func TestGetVersion(t *testing.T) {
	sversion, nversion := GetVersion()
	assert.Regexp(t, "ImageMagick", sversion)
	assert.True(t, nversion > 0)
}


func TestResourceLimit(t *testing.T) {
	area := GetResourceLimit(RESOURCE_AREA)/2
	assert.True(t, SetResourceLimit(RESOURCE_AREA, area))
	assert.Equal(t, area, GetResourceLimit(RESOURCE_AREA))
}<commit_msg>Assert first that area is non zero<commit_after>package imagick

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func TestGetVersion(t *testing.T) {
	sversion, nversion := GetVersion()
	assert.Regexp(t, "ImageMagick", sversion)
	assert.True(t, nversion > 0)
}


func TestResourceLimit(t *testing.T) {
	area := GetResourceLimit(RESOURCE_AREA)
	assert.True(t, area > 0)
	assert.True(t, SetResourceLimit(RESOURCE_AREA, area/2))
	assert.Equal(t, area/2, GetResourceLimit(RESOURCE_AREA))
}
{'fraction_non_alphanumeric': 0.13544973544973546, 'fraction_numerical': 0.006349206349206349, 'mean_word_length': 6.166666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '7528429', 'n_tokens_mistral': 357, 'n_tokens_neox': 352, 'n_words': 65}