title: re.search is not working when the string is read from a tuple
body: <p>output:</p>
  
  <pre><code>[----------] My test environment
  [==========] 14 tests from 6 test cases ran
  [  PASSED  ] 14 tests.\
  
  (f, code, output) = entry
  if output.find("My test environment) != -1:
  for line in output.split("\n"):
      m = re.search("PASSED. *\] (\d+) tests", line)
      if m:
         total = total + int(m.group(1))
  </code></pre>
  
  <p>In this case line is read from output(string) which is being read from a tuple and m appears to be always none in this case. Can anyone please tell me whats wrong with the regular expression? This regular expression works fine when line is hard coded to a string or when line is read from file. </p>