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

Method test_stdin_readline

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

Source from the content-addressed store, hash-verified

472 self.assertEqual(stdout.rstrip(), expected)
473
474 def test_stdin_readline(self):
475 # Issue #11272: check that sys.stdin.readline() replaces '\r\n' by '\n'
476 # on Windows (sys.stdin is opened in binary mode)
477 self.check_input(
478 "import sys; print(repr(sys.stdin.readline()))",
479 b"'abc\\n'")
480
481 def test_builtin_input(self):
482 # Issue #11272: check that input() strips newlines ('\n' or '\r\n')

Callers

nothing calls this directly

Calls 1

check_inputMethod · 0.95

Tested by

no test coverage detected