MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_encoding_error_handler

Method test_encoding_error_handler

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

Source from the content-addressed store, hash-verified

2588 self.assertEqual(f.read().replace(os.linesep, "\n"), uncompressed)
2589
2590 def test_encoding_error_handler(self):
2591 with io.BytesIO(compress(b"foo\xffbar")) as bio:
2592 with open(bio, "rt", encoding="ascii", errors="ignore") as f:
2593 self.assertEqual(f.read(), "foobar")
2594
2595 def test_newline(self):
2596 # 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