Kaydet (Commit) 47d305d6 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #3571: test_bytes mistakingly closed stdin

üst b9ee06c2
...@@ -454,7 +454,8 @@ class BytesTest(BaseBytesTest): ...@@ -454,7 +454,8 @@ class BytesTest(BaseBytesTest):
type2test = bytes type2test = bytes
def test_buffer_is_readonly(self): def test_buffer_is_readonly(self):
with open(sys.stdin.fileno(), "rb", buffering=0) as f: fd = os.dup(sys.stdin.fileno())
with open(fd, "rb", buffering=0) as f:
self.assertRaises(TypeError, f.readinto, b"") 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