<commit_before>require 'listen'

ENV["TEST_LATENCY"] ||= "0.25"

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.color_enabled = true
  config.order = :random
  config.filter_run :focus => true
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run_excluding :broken => true
end

def test_latency
  ENV["TEST_LATENCY"].to_f
end<commit_msg>Don't silent exceptions inside threads<commit_after>require 'listen'

ENV["TEST_LATENCY"] ||= "0.25"

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.color_enabled = true
  config.order = :random
  config.filter_run :focus => true
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run_excluding :broken => true
end

def test_latency
  ENV["TEST_LATENCY"].to_f
end

# Crash loud in tests!
Thread.abort_on_exception = true
{'fraction_non_alphanumeric': 0.12862010221465076, 'fraction_numerical': 0.005110732538330494, 'mean_word_length': 5.49171270718232, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5244618', 'n_tokens_mistral': 432, 'n_tokens_neox': 415, 'n_words': 73}