commit | 47d305d6891ebc049153086585a3b486cb71a415 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sat Aug 16 23:28:44 2008 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sat Aug 16 23:28:44 2008 +0000 |
tree | 49cd3539c4a55976882dc279e6bf95f83322953c | |
parent | b9ee06c26b73056802868c7ea0efb507ccbfa09f [diff] |
Issue #3571: test_bytes mistakingly closed stdin
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 230dbf4..c64ac19 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py
@@ -454,7 +454,8 @@ 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"")