diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-16 23:28:44 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-16 23:28:44 +0000 |
commit | 47d305d6891ebc049153086585a3b486cb71a415 (patch) | |
tree | 49cd3539c4a55976882dc279e6bf95f83322953c /Lib/test/test_bytes.py | |
parent | b9ee06c26b73056802868c7ea0efb507ccbfa09f (diff) | |
download | cpython-git-47d305d6891ebc049153086585a3b486cb71a415.tar.gz |
Issue #3571: test_bytes mistakingly closed stdin
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 230dbf46be..c64ac192e5 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -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"") |