<commit_before>#!/usr/bin/ruby
 
require_relative '../lib/MPW'
require 'test/unit'
require 'yaml'
require 'csv'
 
class TestMPW < Test::Unit::TestCase
	def setup
		@fixture_file = 'files/fixtures.yml'

		file_gpg = 'test.gpg'
		key      = 'a.waksberg@yaegashi.fr'

		puts

		if defined?(I18n.enforce_available_locales)
			I18n.enforce_available_locales = false
		end

		File.delete(file_gpg) if File.exist?(file_gpg)
		@mpw = MPW::MPW.new(file_gpg, key)
		@fixtures = YAML.load_file(@fixture_file)
	end<commit_msg>unittest: add env for key white a real key<commit_after>#!/usr/bin/ruby
 
require_relative '../lib/MPW'
require 'test/unit'
require 'yaml'
require 'csv'
 
class TestMPW < Test::Unit::TestCase
	def setup
		@fixture_file = 'files/fixtures.yml'

		file_gpg = 'test.gpg'
		key      = ENV['MPW_TEST_KEY']

		puts

		if defined?(I18n.enforce_available_locales)
			I18n.enforce_available_locales = false
		end

		File.delete(file_gpg) if File.exist?(file_gpg)
		@mpw = MPW::MPW.new(file_gpg, key)
		@fixtures = YAML.load_file(@fixture_file)
	end
{'fraction_non_alphanumeric': 0.1311787072243346, 'fraction_numerical': 0.0076045627376425855, 'mean_word_length': 4.291457286432161, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '3989321', 'n_tokens_mistral': 470, 'n_tokens_neox': 427, 'n_words': 77}