<commit_before>begin
  require "minitest/autorun"
rescue
  require "minitest/unit"
end

module Minitest
  require "minitest/relative_position"
  require "minitest/extensible_backtrace_filter"

  module Reporters
    require "minitest/reporters/version"

    autoload :BaseReporter, "minitest/reporters/base_reporter"
    autoload :DefaultReporter, "minitest/reporters/default_reporter"
    autoload :SpecReporter, "minitest/reporters/spec_reporter"
    autoload :ProgressReporter, "minitest/reporters/progress_reporter"
    autoload :RubyMateReporter, "minitest/reporters/ruby_mate_reporter"
    autoload :RubyMineReporter, "minitest/reporters/rubymine_reporter"
    autoload :JUnitReporter, "minitest/reporters/junit_reporter"

    class << self
      attr_accessor :reporters
    end

    def self.use!(console_reporters = ProgressReporter.new, env = ENV, backtrace_filter = ExtensibleBacktraceFilter.default_filter)
      use_runner!(console_reporters, env)
      Minitest.backtrace_filter = backtrace_filter

      unless defined?(@@loaded)
        use_around_test_hooks!
        use_old_activesupport_fix!
        @@loaded = true
      end
    end

    def self.use_runner!(console_reporters, env)
      self.reporters = choose_reporters(console_reporters, env)
    end

    def self.use_around_test_hooks!
      Minitest::Test.class_eval do
        def run_with_hooks(*args)
          if defined?(Minitest::Reporters) && reporters = Minitest::Reporters.reporters
            reporters.each { |r| r.before_test(self) }
            result = run_without_hooks(*args)
            reporters.each { |r| r.after_test(self) }
            result
          else
            run_without_hooks(*args)
          end
        end

        alias_method :run_without_hooks, :run
        alias_method :run, :run_with_hooks
      end
    end

    def self.choose_reporters(console_reporters, env)
      if env["TM_PID"]
        [RubyMateReporter.new]
      elsif env["RM_INFO"] || env["TEAMCITY_VERSION"]
        [RubyMineReporter.new]
      else
        Array(console_reporters)
      end
    end

    def self.use_old_activesupport_fix!
      if defined?(ActiveSupport::VERSION) && ActiveSupport::VERSION::MAJOR < 4
        require "minitest/old_activesupport_fix"
      end
    end
  end
end
<commit_msg>Do not require autorun<commit_after>require 'minitest'

module Minitest
  require "minitest/relative_position"
  require "minitest/extensible_backtrace_filter"

  module Reporters
    require "minitest/reporters/version"

    autoload :BaseReporter, "minitest/reporters/base_reporter"
    autoload :DefaultReporter, "minitest/reporters/default_reporter"
    autoload :SpecReporter, "minitest/reporters/spec_reporter"
    autoload :ProgressReporter, "minitest/reporters/progress_reporter"
    autoload :RubyMateReporter, "minitest/reporters/ruby_mate_reporter"
    autoload :RubyMineReporter, "minitest/reporters/rubymine_reporter"
    autoload :JUnitReporter, "minitest/reporters/junit_reporter"

    class << self
      attr_accessor :reporters
    end

    def self.use!(console_reporters = ProgressReporter.new, env = ENV, backtrace_filter = ExtensibleBacktraceFilter.default_filter)
      use_runner!(console_reporters, env)
      Minitest.backtrace_filter = backtrace_filter

      unless defined?(@@loaded)
        use_around_test_hooks!
        use_old_activesupport_fix!
        @@loaded = true
      end
    end

    def self.use_runner!(console_reporters, env)
      self.reporters = choose_reporters(console_reporters, env)
    end

    def self.use_around_test_hooks!
      Minitest::Test.class_eval do
        def run_with_hooks(*args)
          if defined?(Minitest::Reporters) && reporters = Minitest::Reporters.reporters
            reporters.each { |r| r.before_test(self) }
            result = run_without_hooks(*args)
            reporters.each { |r| r.after_test(self) }
            result
          else
            run_without_hooks(*args)
          end
        end

        alias_method :run_without_hooks, :run
        alias_method :run, :run_with_hooks
      end
    end

    def self.choose_reporters(console_reporters, env)
      if env["TM_PID"]
        [RubyMateReporter.new]
      elsif env["RM_INFO"] || env["TEAMCITY_VERSION"]
        [RubyMineReporter.new]
      else
        Array(console_reporters)
      end
    end

    def self.use_old_activesupport_fix!
      if defined?(ActiveSupport::VERSION) && ActiveSupport::VERSION::MAJOR < 4
        require "minitest/old_activesupport_fix"
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08362676056338028, 'fraction_numerical': 0.00044014084507042255, 'mean_word_length': 3.1889400921658986, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '325571', 'n_tokens_mistral': 1542, 'n_tokens_neox': 1482, 'n_words': 250}