<commit_before># encoding: utf-8

require 'minitest/unit'

test = namespace :test do

  # test:all
  desc 'Run all tests'
  task :all do
    ENV['QUIET'] ||= 'true'
    $VERBOSE = (ENV['VERBOSE'] == 'true')

    $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))

    # require our test helper so we don't have to in each individual test
    require 'test/helper'

    test_files = Dir['test/**/*_spec.rb'] + Dir['test/**/test_*.rb']
    test_files.each { |f| require f }

    MiniTest::Unit.new.run($VERBOSE ? %w( --verbose ) : %w())
  end

  # test:...
  %w( base cli data_sources extra filters helpers tasks ).each do |dir|
    desc "Run all #{dir} tests"
    task dir.to_sym do |task|
      ENV['QUIET'] ||= 'true'
      $VERBOSE = (ENV['VERBOSE'] == 'true')

      $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))

      # require our test helper so we don't have to in each individual test
      require 'test/helper'

      test_files = Dir["test/#{dir}/**/*_spec.rb"] + Dir["test/#{dir}/**/test_*.rb"]
      test_files.each { |f| require f }

      MiniTest::Unit.new.run($VERBOSE ? %w( --verbose ) : %w())
    end
  end

end

desc 'Alias for test:all'
task :test => [ :'test:all' ]<commit_msg>fixed test task return value<commit_after># encoding: utf-8

require 'minitest/unit'

test = namespace :test do

  # test:all
  desc 'Run all tests'
  task :all do
    ENV['QUIET'] ||= 'true'
    $VERBOSE = (ENV['VERBOSE'] == 'true')

    $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))

    # require our test helper so we don't have to in each individual test
    require 'test/helper'

    test_files = Dir['test/**/*_spec.rb'] + Dir['test/**/test_*.rb']
    test_files.each { |f| require f }

    exit MiniTest::Unit.new.run($VERBOSE ? %w( --verbose ) : %w())
  end

  # test:...
  %w( base cli data_sources extra filters helpers tasks ).each do |dir|
    desc "Run all #{dir} tests"
    task dir.to_sym do |task|
      ENV['QUIET'] ||= 'true'
      $VERBOSE = (ENV['VERBOSE'] == 'true')

      $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))

      # require our test helper so we don't have to in each individual test
      require 'test/helper'

      test_files = Dir["test/#{dir}/**/*_spec.rb"] + Dir["test/#{dir}/**/test_*.rb"]
      test_files.each { |f| require f }

      exit MiniTest::Unit.new.run($VERBOSE ? %w( --verbose ) : %w())
    end
  end

end

desc 'Alias for test:all'
task :test => [ :'test:all' ]
{'fraction_non_alphanumeric': 0.1812375249500998, 'fraction_numerical': 0.0007984031936127744, 'mean_word_length': 3.0096, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3659330', 'n_tokens_mistral': 919, 'n_tokens_neox': 892, 'n_words': 232}