import re


def RemoveTestCounts(output):
  """Removes test counts from a Google Test program's output."""

  output = re.sub(r'\d+ tests, listed below',
                  '? tests, listed below', output)
  output = re.sub(r'\d+ FAILED TESTS',
                  '? FAILED TESTS', output)
  output = re.sub(r'\d+ tests from \d+ test cases',
                  '? tests from ? test cases', output)
  output = re.sub(r'\d+ tests from ([a-zA-Z_])',
                  r'? tests from \1', output)
  return re.sub(r'\d+ tests\.', '? tests.', output)