mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #3571: test_bytes mistakingly closed stdin
This commit is contained in:
parent
b9ee06c26b
commit
47d305d689
1 changed files with 2 additions and 1 deletions
|
@ -454,7 +454,8 @@ class BytesTest(BaseBytesTest):
|
|||
type2test = bytes
|
||||
|
||||
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"")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue