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

Method test_input_no_stdout_fileno

Lib/test/test_builtin.py:2732–2745  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2730 @unittest.skip("TODO: RUSTPYTHON; FAILURE, WORKER BUG")
2731 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: got 0 lines in pipe but expected 2, child output was: quux
2732 def test_input_no_stdout_fileno(self):
2733 # Issue #24402: If stdin is the original terminal but stdout.fileno()
2734 # fails, do not use the original stdout file descriptor
2735 def child(wpipe):
2736 print("stdin.isatty():", sys.stdin.isatty(), file=wpipe)
2737 sys.stdout = io.StringIO() # Does not support fileno()
2738 input("prompt")
2739 print("captured:", ascii(sys.stdout.getvalue()), file=wpipe)
2740 lines = self.run_child(child, b"quux\r")
2741 expected = (
2742 "stdin.isatty(): True",
2743 "captured: 'prompt'",
2744 )
2745 self.assertSequenceEqual(lines, expected)
2746
2747class TestSorted(unittest.TestCase):
2748

Callers

nothing calls this directly

Calls 2

run_childMethod · 0.95
assertSequenceEqualMethod · 0.80

Tested by

no test coverage detected