antoine.pitrou
2008-08-16 23:28:45 UTC
Author: antoine.pitrou
Date: Sun Aug 17 01:28:44 2008
New Revision: 65731
Log:
Issue #3571: test_bytes mistakingly closed stdin
Modified:
python/branches/py3k/Lib/test/test_bytes.py
Modified: python/branches/py3k/Lib/test/test_bytes.py
==============================================================================
--- python/branches/py3k/Lib/test/test_bytes.py (original)
+++ python/branches/py3k/Lib/test/test_bytes.py Sun Aug 17 01:28:44 2008
@@ -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"")
Date: Sun Aug 17 01:28:44 2008
New Revision: 65731
Log:
Issue #3571: test_bytes mistakingly closed stdin
Modified:
python/branches/py3k/Lib/test/test_bytes.py
Modified: python/branches/py3k/Lib/test/test_bytes.py
==============================================================================
--- python/branches/py3k/Lib/test/test_bytes.py (original)
+++ python/branches/py3k/Lib/test/test_bytes.py Sun Aug 17 01:28:44 2008
@@ -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"")