def test_encoding_error_handler(self):
    with self.open(self.filename, 'wb') as f:
        f.write(b'foo\xffbar')
    with self.open(self.filename, 'rt', encoding='ascii', errors='ignore') as f:
        self.assertEqual(f.read(), 'foobar')
def test_encoding_error_handler(self):
    with self.open(self.filename, 'wb') as f:
        f.write(b'foo\xffbar')
    with self.open(self.filename, 'rt', encoding='ascii', errors='ignore') as f:
        self.assertEqual(f.read(), 'foobar')