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

Method test_with_errored_file

Lib/test/test_tabnanny.py:316–322  ·  view source on GitHub ↗

Should displays error when errored python file is given.

(self)

Source from the content-addressed store, hash-verified

314 self.assertListEqual(err.splitlines(), stderr.splitlines())
315
316 def test_with_errored_file(self):
317 """Should displays error when errored python file is given."""
318 with TemporaryPyFile(SOURCE_CODES["wrong_indented"]) as file_path:
319 stderr = f"{file_path!r}: Indentation Error: "
320 stderr += ('unindent does not match any outer indentation level'
321 ' (<string>, line 3)')
322 self.validate_cmd(file_path, stderr=stderr, expect_failure=True)
323
324 def test_with_error_free_file(self):
325 """Should not display anything if python file is correctly indented."""

Callers

nothing calls this directly

Calls 2

validate_cmdMethod · 0.95
TemporaryPyFileClass · 0.85

Tested by

no test coverage detected