summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-28 22:07:56 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-28 22:07:56 (GMT)
commitd6af04780a99c80cb2d7339e3b47a3e1289a6025 (patch)
tree17dc45441907432c0e7c6e5b806447412d0db38b /Lib/test
parent314397aeef7ae284c98137dacb011985614b135e (diff)
parent7611964b2cb82e38f3354e665bbe6c9e7efa8cb6 (diff)
downloadcpython-d6af04780a99c80cb2d7339e3b47a3e1289a6025.zip
cpython-d6af04780a99c80cb2d7339e3b47a3e1289a6025.tar.gz
cpython-d6af04780a99c80cb2d7339e3b47a3e1289a6025.tar.bz2
(Merge 3.4) Fix test_bytes when sys.stdin is None, for example on Windows when
using pythonw.exe instead of python.exe
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_bytes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index f350211..43b6c82 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -700,7 +700,7 @@ class BytesTest(BaseBytesTest, unittest.TestCase):
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"")