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 inspect
  import logging
  import os
  import re
  import sys
  from testpath import modified_env
  from inspect import getmodule
  from doctest import REPORTING_FLAGS, REPORT_ONLY_FIRST_FAILURE, _unittest_reportflags, DocTestRunner, _extract_future_flags, pdb, _OutputRedirectingPdb, _exception_traceback, linecache
  from nose.plugins import doctests, Plugin
  from nose.util import anyp, tolist
  from IPython.utils.py3compat import builtin_mod, PY3, getcwd
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