class_docstr: Testing tabnanny.check().
class_docstr_tok: ["Testing","tabnanny.check","(",")","."]
docstr: A python source code file eligible for raising 'tokenize.TokenError'.
docstr_tok: ["A","python","source","code","file","eligible","for","raising","'tokenize.TokenError","'","."]
code: def test_when_tokenize_tokenerror(self):
      """A python source code file eligible for raising 'tokenize.TokenError'."""
      with TemporaryPyFile(
          SOURCE_CODES["incomplete_expression"]
      ) as file_path:
          err = "('EOF in multi-line statement', (7, 0))\n"
          err = f"{file_path!r}: Token Error: {err}"
          with self.assertRaises(SystemExit):
              self.verify_tabnanny_check(file_path, err=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 7 for calling the TestCheck obj's underlying member method code with example usage: obj.test_when_tokenize_tokenerror() without return types