(self)
| 1182 | self.assertEqual(f.read(), text) |
| 1183 | |
| 1184 | def test_encoding_error_handler(self): |
| 1185 | # Test with non-default encoding error handler. |
| 1186 | with self.open(self.filename, "wb") as f: |
| 1187 | f.write(b"foo\xffbar") |
| 1188 | with self.open(self.filename, "rt", encoding="ascii", errors="ignore") \ |
| 1189 | as f: |
| 1190 | self.assertEqual(f.read(), "foobar") |
| 1191 | |
| 1192 | def test_newline(self): |
| 1193 | # Test with explicit newline (universal newline mode disabled). |
nothing calls this directly
no test coverage detected