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

Method check_repl_stdout_flush

Lib/test/test_cmd_line_script.py:191–195  ·  view source on GitHub ↗
(self, separate_stderr=False)

Source from the content-addressed store, hash-verified

189 stderr.close()
190
191 def check_repl_stdout_flush(self, separate_stderr=False):
192 with self.interactive_python(separate_stderr) as p:
193 p.stdin.write(b"print('foo')\n")
194 p.stdin.flush()
195 self.assertEqual(b'foo', p.stdout.readline().strip())
196
197 def check_repl_stderr_flush(self, separate_stderr=False):
198 with self.interactive_python(separate_stderr) as p:

Calls 6

interactive_pythonMethod · 0.95
writeMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45
readlineMethod · 0.45

Tested by

no test coverage detected