MCPcopy Index your code
hub / github.com/python/cpython / test_encoding_error_handler

Method test_encoding_error_handler

Lib/test/test_zstd.py:2589–2592  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2587 self.assertEqual(f.read().replace(os.linesep, "\n"), uncompressed)
2588
2589 def test_encoding_error_handler(self):
2590 with io.BytesIO(compress(b"foo\xffbar")) as bio:
2591 with open(bio, "rt", encoding="ascii", errors="ignore") as f:
2592 self.assertEqual(f.read(), "foobar")
2593
2594 def test_newline(self):
2595 # Test with explicit newline (universal newline mode disabled).

Callers

nothing calls this directly

Calls 4

compressFunction · 0.90
openFunction · 0.90
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected