<commit_before>require 'doh/test/backtrace_parser'

# this class provides an example of how you could replace the built-in doh/test/stream_output class
# you could use the class below in the dohtest binary instead

module DohTest

class SimpleOutput
  def run_begin(config)
    puts "run begin: #{config}"
  end

  def run_end(duration)
    puts "run end: #{duration}"
  end

  def group_begin(group_name)
    puts "group begin: #{group_name}"
  end

  def group_end(group_name)
    puts "group end: #{group_name}"
  end

  def tests_skipped(group_name, count)
    puts "tests skipped: group #{group_name}, count #{count}"
  end

  def test_begin(group_name, test_name)
    puts "test begin: #{group_name}.#{test_name}"
  end

  def test_end(group_name, test_name)
    puts "test end: #{group_name}.#{test_name}"
  end

  def test_error(group_name, test_name, error)
    warn "test error: #{group_name}.#{test_name} => #{error.class} at #{DohTest::backtrace_summary(error)} => #{error}"
  end

  def assertion_failed(group_name, test_name, failure)
    warn "assertion failed: #{group_name}.#{test_name} at #{DohTest::backtrace_summary(failure)} => #{failure}"
  end

  def assertion_passed(group_name, test_name)
    puts "assertion passed: #{group_name}.#{test_name}"
  end
end

end<commit_msg>update sample simple output with latest interface changes<commit_after>require 'doh/test/backtrace_parser'

# this class provides an example of how you could replace the built-in doh/test/stream_output class
# you could use the class below in the dohtest binary instead

module DohTest

class SimpleOutput
  def run_begin(config)
    puts "run begin: #{config}"
  end

  def run_end(duration)
    puts "run end: #{duration}"
  end

  def group_begin(group_name)
    puts "group begin: #{group_name}"
  end

  def group_end(group_name, tests_ran, tests_skipped, assertions_passed, assertions_failed)
    puts "group end: #{group_name}; #{tests_ran} tests ran, #{tests_skipped} tests skipped, assertions passed #{assertions_passed}, assertions failed #{assertions_failed}"
  end

  def test_begin(group_name, test_name)
    puts "test begin: #{group_name}.#{test_name}"
  end

  def test_end(group_name, test_name)
    puts "test end: #{group_name}.#{test_name}"
  end

  def test_error(group_name, test_name, error)
    warn "test error: #{group_name}.#{test_name} => #{error.class} at #{DohTest::backtrace_summary(error)} => #{error}"
  end

  def assertion_failed(group_name, test_name, failure)
    warn "assertion failed: #{group_name}.#{test_name} at #{DohTest::backtrace_summary(failure)} => #{failure}"
  end

  def assertion_passed(group_name, test_name)
    puts "assertion passed: #{group_name}.#{test_name}"
  end
end

end
{'fraction_non_alphanumeric': 0.11546920821114369, 'fraction_numerical': 0.0, 'mean_word_length': 4.906926406926407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3479612', 'n_tokens_mistral': 911, 'n_tokens_neox': 904, 'n_words': 253}