<commit_before>class FancyTapReporter < Tapout::Reporters::Abstract

  #
  def start_suite(entry)
    @start = Time.now
    @i = 0
    #n = 0
    #suite.concerns.each{ |f| f.concerns.each { |s| n += s.ok.size } }
    puts "1..#{entry['count']}"
  end

  #
  def start_case(entry)
    #$stdout.puts concern.label.ansi(:bold)
  end

  #
  def pass(entry)
    super(entry)

    @i += 1
    #desc = entry['message'] #+ " #{ok.arguments.inspect}"

    # puts "ok".ansi(*config.pass) + highlight(" #{@i} - #{entry['label']}")
    puts "ok #{@i} - #{entry['label']}"
  end

  #
  def fail(entry)
    super(entry)

    @i += 1
    x = entry['exception']

    #desc = #ok.concern.label + " #{ok.arguments.inspect}"

    body = []
    body << "FAIL #{x['file']}:#{x['line']}" #clean_backtrace(exception.backtrace)[0]
    body << "#{x['message']}"
    body << x['snippet']
    body << x['backtrace']
    body << entry['stdout']
    body = body.join("\n").gsub(/^/, '  # ')

    # puts "not ok".ansi(*config.fail) + highlight(" #{@i} - #{entry['label']}")
    puts "not ok #{@i} - #{entry['label']}"
    puts body
  end

  #
  def error(entry)
    super(entry)

    @i += 1
    x = entry['exception']

    #desc = ok.concern.label + " #{ok.arguments.inspect}"

    body = []
    body << "ERROR #{x['file']}:#{x['line']}" #clean_backtrace(exception.backtrace)[0..2].join("    \n")
    body << "#{x['class']}: #{x['message']}"
    body << ""
    body << x['backtrace']
    body << entry['stdout']
    body = body.join("\n").gsub(/^/, '  # ')

    # puts "not ok".ansi(*config.error) + highlight(" #{@i} - #{entry['label']}")
    puts "not ok #{@i} - #{entry['label']}"
    puts body
  end

  def highlight(anything)
    anything.ansi(*config.highlight)
  end

  # to print out formatted time and rates
  def finish_suite(entry)
    time, rate, avg = time_tally(entry)
    delta = duration(time)

    ending = []
    ending << ""
    ending << tally_message(entry)
    ending << "[%s %.2ft/s %.4fs/t] " % [delta, rate, avg] + "Finished at: #{Time.now}"
    ending = ending.join("\n").gsub(/^/, '  # ')

    puts ending
  end<commit_msg>AV-69: jenkins tap plugin doesn't like fancy tap; commenting out some tests for testing<commit_after>class FancyTapReporter < Tapout::Reporters::Abstract

  #
  def start_suite(entry)
    @start = Time.now
    @i = 0
    #n = 0
    #suite.concerns.each{ |f| f.concerns.each { |s| n += s.ok.size } }
    puts "1..#{entry['count']}"
  end

  #
  def start_case(entry)
    #$stdout.puts concern.label.ansi(:bold)
  end

  #
  def pass(entry)
    super(entry)

    @i += 1
    #desc = entry['message'] #+ " #{ok.arguments.inspect}"

    # puts "ok".ansi(*config.pass) + highlight(" #{@i} - #{entry['label']}")
    puts "ok #{@i} - #{entry['label']}"
  end

  #
  def fail(entry)
    super(entry)

    @i += 1
    x = entry['exception']

    #desc = #ok.concern.label + " #{ok.arguments.inspect}"

    body = []
    body << "FAIL #{x['file']}:#{x['line']}" #clean_backtrace(exception.backtrace)[0]
    body << "#{x['message']}"
    body << x['snippet']
    body << x['backtrace']
    body << entry['stdout']
    body = body.join("\n").gsub(/^/, '  # ')

    # puts "not ok".ansi(*config.fail) + highlight(" #{@i} - #{entry['label']}")
    puts "not ok #{@i} - #{entry['label']}"
    puts body
  end

  #
  def error(entry)
    super(entry)

    @i += 1
    x = entry['exception']

    #desc = ok.concern.label + " #{ok.arguments.inspect}"

    body = []
    body << "ERROR #{x['file']}:#{x['line']}" #clean_backtrace(exception.backtrace)[0..2].join("    \n")
    body << "#{x['class']}: #{x['message']}"
    body << ""
    body << x['backtrace']
    body << entry['stdout']
    body = body.join("\n").gsub(/^/, '  # ')

    # puts "not ok".ansi(*config.error) + highlight(" #{@i} - #{entry['label']}")
    puts "not ok #{@i} - #{entry['label']}"
    puts body
  end

  def highlight(anything)
    anything.ansi(*config.highlight)
  end

  # to print out formatted time and rates
  def finish_suite(entry)
    time, rate, avg = time_tally(entry)
    delta = duration(time)

    ending = []
    ending << ""
    # ending << tally_message(entry)
    ending << "[%s %.2ft/s %.4fs/t] " % [delta, rate, avg] + "Finished at: #{Time.now}"
    ending = ending.join("\n").gsub(/^/, '  # ')

    puts ending
  end
{'fraction_non_alphanumeric': 0.22440944881889763, 'fraction_numerical': 0.00555812876331635, 'mean_word_length': 2.8289007092198584, 'pattern_counts': {'":': 0, '<': 57, '<?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': '3219670', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1601, 'n_words': 332}