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

Method test_null_byte_in_interactive_mode

Lib/test/test_cmd_line.py:216–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

214
215 @support.cpython_only
216 def test_null_byte_in_interactive_mode(self):
217 # gh-140594: Fix an out of bounds read when a single NUL character
218 # is read from the standard input in interactive mode.
219 proc = spawn_python('-i')
220 proc.communicate(b'\x00', timeout=support.SHORT_TIMEOUT)
221 self.assertEqual(proc.returncode, 0)
222
223 def test_relativedir_bug46421(self):
224 # Test `python -m unittest` with a relative directory beginning with ./

Callers

nothing calls this directly

Calls 3

spawn_pythonFunction · 0.90
communicateMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected