[Python-checkins] cpython (3.4): Fix test_bytes when sys.stdin is None, for example on Windows when using
victor.stinner
python-checkins at python.org
Tue Jul 29 00:07:13 CEST 2014
http://hg.python.org/cpython/rev/a1e01081e731
changeset: 91904:a1e01081e731
branch: 3.4
parent: 91902:ad291f7e297d
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jul 28 22:07:07 2014 +0200
summary:
Fix test_bytes when sys.stdin is None, for example on Windows when using
pythonw.exe instead of python.exe
files:
Lib/test/test_bytes.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -700,7 +700,7 @@
type2test = bytes
def test_buffer_is_readonly(self):
- fd = os.dup(sys.stdin.fileno())
+ fd = os.open(__file__, os.O_RDONLY)
with open(fd, "rb", buffering=0) as f:
self.assertRaises(TypeError, f.readinto, b"")
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list