MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_with_correct_code

Method test_with_correct_code

Lib/test/test_tabnanny.py:270–276  ·  view source on GitHub ↗

A python source code without any whitespace related problems.

(self, MockNannyNag)

Source from the content-addressed store, hash-verified

268
269 @mock.patch('tabnanny.NannyNag')
270 def test_with_correct_code(self, MockNannyNag):
271 """A python source code without any whitespace related problems."""
272
273 with TemporaryPyFile(SOURCE_CODES["error_free"]) as file_path:
274 with open(file_path) as f:
275 tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
276 self.assertFalse(MockNannyNag.called)
277
278 def test_with_errored_codes_samples(self):
279 """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