(self)
| 1191 | self.assertEqual(f.read(), text) |
| 1192 | |
| 1193 | def test_encoding_error_handler(self): |
| 1194 | # Test with non-default encoding error handler. |
| 1195 | with self.open(self.filename, "wb") as f: |
| 1196 | f.write(b"foo\xffbar") |
| 1197 | with self.open(self.filename, "rt", encoding="ascii", errors="ignore") \ |
| 1198 | as f: |
| 1199 | self.assertEqual(f.read(), "foobar") |
| 1200 | |
| 1201 | def test_newline(self): |
| 1202 | # Test with explicit newline (universal newline mode disabled). |
nothing calls this directly
no test coverage detected