Commit d6af0478 authored by Victor Stinner's avatar Victor Stinner

(Merge 3.4) Fix test_bytes when sys.stdin is None, for example on Windows when

using pythonw.exe instead of python.exe
parents 314397ae 7611964b
......@@ -700,7 +700,7 @@ class BytesTest(BaseBytesTest, unittest.TestCase):
type2test = bytes
def test_buffer_is_readonly(self):
fd = os.dup(sys.stdin.fileno())
fd = os.open(__file__, os.O_RDONLY)
with open(fd, "rb", buffering=0) as f:
self.assertRaises(TypeError, f.readinto, b"")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment