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

Method test_when_no_file

Lib/test/test_tabnanny.py:238–244  ·  view source on GitHub ↗

A python file which does not exist actually in system.

(self)

Source from the content-addressed store, hash-verified

236 self.verify_tabnanny_check(file_path, out=out)
237
238 def test_when_no_file(self):
239 """A python file which does not exist actually in system."""
240 path = 'no_file.py'
241 err = (f"{path!r}: I/O Error: [Errno {errno.ENOENT}] "
242 f"{os.strerror(errno.ENOENT)}: {path!r}\n")
243 with self.assertRaises(SystemExit):
244 self.verify_tabnanny_check(path, err=err)
245
246 def test_errored_directory(self):
247 """Directory containing wrongly indented python source code files."""

Callers

nothing calls this directly

Calls 2

verify_tabnanny_checkMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected