MCPcopy Index your code
hub / github.com/python/cpython / test_when_tokenize_tokenerror

Method test_when_tokenize_tokenerror

Lib/test/test_tabnanny.py:211–217  ·  view source on GitHub ↗

A python source code file eligible for raising 'tokenize.TokenError'.

(self)

Source from the content-addressed store, hash-verified

209 self.verify_tabnanny_check(file_path, err=err)
210
211 def test_when_tokenize_tokenerror(self):
212 """A python source code file eligible for raising 'tokenize.TokenError'."""
213 with TemporaryPyFile(SOURCE_CODES["incomplete_expression"]) as file_path:
214 err = "('EOF in multi-line statement', (7, 0))\n"
215 err = f"{file_path!r}: Token Error: {err}"
216 with self.assertRaises(SystemExit):
217 self.verify_tabnanny_check(file_path, err=err)
218
219 def test_when_nannynag_error_verbose(self):
220 """A python source code file eligible for raising `tabnanny.NannyNag`.

Callers

nothing calls this directly

Calls 3

verify_tabnanny_checkMethod · 0.95
TemporaryPyFileClass · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected