(self)
| 1169 | self.assertEqual("ok", out.decode().strip()) |
| 1170 | |
| 1171 | def test_read_byteslike(self): |
| 1172 | r = MemviewBytesIO(b'Just some random string\n') |
| 1173 | t = self.TextIOWrapper(r, 'utf-8') |
| 1174 | |
| 1175 | # TextIOwrapper will not read the full string, because |
| 1176 | # we truncate it to a multiple of the native int size |
| 1177 | # so that we can construct a more complex memoryview. |
| 1178 | bytes_val = _to_memoryview(r.getvalue()).tobytes() |
| 1179 | |
| 1180 | self.assertEqual(t.read(200), bytes_val.decode('utf-8')) |
| 1181 | |
| 1182 | def test_issue22849(self): |
| 1183 | class F(object): |
nothing calls this directly
no test coverage detected