class_docstr: Second-chance checker with support for random tests.
  
  If the default comparison doesn't pass, this checker looks in the expected
  output string for flags that tell us to ignore the output.
docstr: Check output, accepting special markers embedded in the output.
  
  If the output didn't pass the default validation but the special string
  '#random' is included, we accept it.
docstr_tok: ["Check","output",",","accepting","special","markers","embedded","in","the","output",".","If","the","output","did","n't","pass","the","default","validation","but","the","special","string","'","#","random","'","is","included",",","we","accept","it","."]
code: def check_output(self, want, got, optionflags):
      """Check output, accepting special markers embedded in the output.
  
      If the output didn't pass the default validation but the special string
      '#random' is included, we accept it."""
  
      # Let the original tester verify first, in case people have valid tests
      # that happen to have a comment saying '#random' embedded in.
      ret = doctest.OutputChecker.check_output(
          self, want, got, optionflags
      )
      if not ret and self.random_re.search(want):
          # print >> sys.stderr, 'RANDOM OK:',want  # dbg
          return True
  
      return ret
  
imports: import doctest
  import logging
  import re
  from testpath import modified_env
label_desc: Use image node_id 1 for calling the IPDoctestOutputChecker obj's underlying member method code with example usage: obj.check_output(want, got, optionflags) and returns: ret, True