class_docstr: Testing tabnanny.check().
class_docstr_tok: ["Testing","tabnanny.check","(",")","."]
docstr: Common verification for tabnanny.check().
  
  Use this method to assert expected values of `stdout` and `stderr` after
  running tabnanny.check() on given `dir` or `file` path. Because
  tabnanny.check() captures exceptions and writes to `stdout` and
  `stderr`, asserting standard outputs is the only way.
docstr_tok: ["Common","verification","for","tabnanny.check","(",")",".","Use","this","method","to","assert","expected","values","of","`","stdout","`","and","`","stderr","`","after","running","tabnanny.check","(",")","on","given","`","dir","`","or","`","file","`","path",".","Because","tabnanny.check","(",")","captures","exceptions","and","writes","to","`","stdout","`","and","`","stderr","`",",","asserting","standard","outputs","is","the","only","way","."]
code: def verify_tabnanny_check(self, dir_or_file, out="", err=""):
      """Common verification for tabnanny.check().
  
      Use this method to assert expected values of `stdout` and `stderr` after
      running tabnanny.check() on given `dir` or `file` path. Because
      tabnanny.check() captures exceptions and writes to `stdout` and
      `stderr`, asserting standard outputs is the only way.
      """
      with captured_stdout() as stdout, captured_stderr() as stderr:
          tabnanny.check(dir_or_file)
      self.assertEqual(stdout.getvalue(), out)
      self.assertEqual(stderr.getvalue(), err)
  
imports: from unittest import TestCase, mock
  import errno
  import os
  import tabnanny
  import tokenize
  import tempfile
  import textwrap
  from test.support import captured_stderr, captured_stdout, script_helper, findfile
  from test.support.os_helper import unlink
label_desc: Use image node_id 2 for calling the TestCheck obj's underlying member method code with example usage: obj.verify_tabnanny_check(dir_or_file, out, err) without return types