#2538: bytes objects can only provide read-only buffers
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index 5bda935..230dbf4 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -453,6 +453,11 @@
 class BytesTest(BaseBytesTest):
     type2test = bytes
 
+    def test_buffer_is_readonly(self):
+        with open(sys.stdin.fileno(), "rb", buffering=0) as f:
+            self.assertRaises(TypeError, f.readinto, b"")
+
+
 class ByteArrayTest(BaseBytesTest):
     type2test = bytearray