class_docstr: Testing tabnanny.check().
class_docstr_tok: ["Testing","tabnanny.check","(",")","."]
docstr: Directory containing few error free python source code files.
  
  Because order of files returned by `os.lsdir()` is not fixed, verify the
  existence of each output lines at `stdout` using `in` operator.
  `verbose` mode of `tabnanny.verbose` asserts `stdout`.
docstr_tok: ["Directory","containing","few","error","free","python","source","code","files",".","Because","order","of","files","returned","by","`","os.lsdir","(",")","`","is","not","fixed",",","verify","the","existence","of","each","output","lines","at","`","stdout","`","using","`","in","`","operator",".","`","verbose","`","mode","of","`","tabnanny.verbose","`","asserts","`","stdout","`","."]
code: def test_correct_directory_verbose(self):
      """Directory containing few error free python source code files.
  
      Because order of files returned by `os.lsdir()` is not fixed, verify the
      existence of each output lines at `stdout` using `in` operator.
      `verbose` mode of `tabnanny.verbose` asserts `stdout`.
      """
      with tempfile.TemporaryDirectory() as tmp_dir:
          lines = [
              f"{tmp_dir!r}: listing directory\n",
          ]
          file1 = TemporaryPyFile(
              SOURCE_CODES["error_free"], directory=tmp_dir
          )
          file2 = TemporaryPyFile(
              SOURCE_CODES["error_free"], directory=tmp_dir
          )
          with file1 as file1_path, file2 as file2_path:
              for file_path in (file1_path, file2_path):
                  lines.append(
                      f"{file_path!r}: Clean bill of health.\n"
                  )
  
              tabnanny.verbose = 1
              with captured_stdout() as stdout, captured_stderr() as stderr:
                  tabnanny.check(tmp_dir)
              stdout = stdout.getvalue()
              for line in lines:
                  with self.subTest(line=line):
                      self.assertIn(line, stdout)
              self.assertEqual(stderr.getvalue(), "")
  
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 4 for calling the TestCheck obj's underlying member method code with example usage: obj.test_correct_directory_verbose() without return types