<commit_before>#encoding: utf-8
require_relative '../lib/pmeth'
require 'test/unit'

class TestPMeth < Test::Unit::TestCase

	T1 = %w(a b c d e f g h i j k l m n o p q r s t) # 20
	T2 = T1[0..-2] # 19
	T3 = T1[0..5] # 6

	TEST_ARRAYS = [T1, T2, T3]

	def test_division
		x1 = PMeth.division(T1)
		assert(x1==1||x1==2||x1==4||x1==5||x1==10, "length 20 array, division wrong, #{x1}")

		x2 = PMeth.division(T2)
		assert(x2==1, "length 19 array, division wrong, #{x2}")

		x3 = PMeth.division(T3)
		assert(x3==1||x3==2||x3==3, "length 6 array, division wrong, #{x3}")
	end<commit_msg>improved tests slightly<commit_after>#encoding: utf-8
require_relative '../lib/pmeth'
require 'test/unit'

class TestPMeth < Test::Unit::TestCase

	T1 = (1..20).to_a
	T2 = (1..19).to_a
	T3 = (1..6).to_a
	T4 = (1..53).to_a

	TEST_ARRAYS = [T1, T2, T3, T4]

	def test_division
		x1 = PMeth.division(T1)
		assert(x1==1||x1==2||x1==4||x1==5||x1==10, "length 20 array, division wrong, #{x1}")

		x2 = PMeth.division(T2)
		assert(x2==1, "length 19 array, division wrong, #{x2}")

		x3 = PMeth.division(T3)
		assert(x3==1||x3==2||x3==3, "length 6 array, division wrong, #{x3}")
	end
{'fraction_non_alphanumeric': 0.2050173010380623, 'fraction_numerical': 0.08996539792387544, 'mean_word_length': 4.074561403508772, 'pattern_counts': {'":': 0, '<': 5, '<?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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3782840', 'n_tokens_mistral': 572, 'n_tokens_neox': 528, 'n_words': 124}