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

Method test_with_correct_code

Lib/test/test_tabnanny.py:267–273  ·  view source on GitHub ↗

A python source code without any whitespace related problems.

(self, MockNannyNag)

Source from the content-addressed store, hash-verified

265
266 @mock.patch('tabnanny.NannyNag')
267 def test_with_correct_code(self, MockNannyNag):
268 """A python source code without any whitespace related problems."""
269
270 with TemporaryPyFile(SOURCE_CODES["error_free"]) as file_path:
271 with open(file_path) as f:
272 tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
273 self.assertFalse(MockNannyNag.called)
274
275 def test_with_errored_codes_samples(self):
276 """A python source code with whitespace related sampled problems."""

Callers

nothing calls this directly

Calls 3

TemporaryPyFileClass · 0.85
assertFalseMethod · 0.80
openFunction · 0.50

Tested by

no test coverage detected