summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-08-16 23:28:44 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-08-16 23:28:44 (GMT)
commit47d305d6891ebc049153086585a3b486cb71a415 (patch)
tree49cd3539c4a55976882dc279e6bf95f83322953c /Lib/test/test_bytes.py
parentb9ee06c26b73056802868c7ea0efb507ccbfa09f (diff)
downloadcpython-47d305d6891ebc049153086585a3b486cb71a415.zip
cpython-47d305d6891ebc049153086585a3b486cb71a415.tar.gz
cpython-47d305d6891ebc049153086585a3b486cb71a415.tar.bz2
Issue #3571: test_bytes mistakingly closed stdin
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r--Lib/test/test_bytes.py3
1 files changed, 2 insertions, 1 deletions
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 @@ 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"")