diff options
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 5bda9354d2..230dbf46be 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -453,6 +453,11 @@ class BaseBytesTest(unittest.TestCase): 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 |